MM_jumpMenu delay modification - Can anyone help?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Crisler

    #1

    MM_jumpMenu delay modification - Can anyone help?

    To better accommodate clients browsing by keyboard, I'd like to insert
    a settimeout event into the MM_jumpMenu function to cause a two-second
    delay before it executes. Have tried it a few ways, but no luck. The
    MM_jumpMenu script in question:

    <script language="JavaS cript">
    <!--
    function MM_jumpMenu(tar g,selObj,restor e){ //v3.0
    eval(targ+".loc ation='"+selObj .options[selObj.selected Index].value+"'");
    if (restore) selObj.selected Index=0;
    }
    //-->
    </script>
  • Janwillem Borleffs

    #2
    Re: MM_jumpMenu delay modification - Can anyone help?

    Bob Crisler wrote:[color=blue]
    > To better accommodate clients browsing by keyboard, I'd like to insert
    > a settimeout event into the MM_jumpMenu function to cause a two-second
    > delay before it executes. Have tried it a few ways, but no luck. The
    > MM_jumpMenu script in question:
    >
    > <script language="JavaS cript">
    > <!--
    > function MM_jumpMenu(tar g,selObj,restor e){ //v3.0
    >
    >
    > eval(targ+".loc ation='"+selObj .options[selObj.selected Index].value+"'");
    > if (restore) selObj.selected Index=0; } //-->
    > </script>[/color]

    <script type="text/javascript">

    function MM_jumpMenu(tar g,selObj){

    setTimeout(targ +".location='"+ selObj.options[selObj.selected Index].value+"'"
    , 2000);
    }

    </script>


    JW



    Comment

    • Bob Crisler

      #3
      Re: MM_jumpMenu delay modification - Can anyone help?

      Thank you, Janwillem.

      I tried the code, and while it does pause before taking the user to
      the site referenced in the select meny, it also deletes any reference
      of the referring page in the browser history. (Is that what the 'eval'
      and 'if' in the original script accomplish?)

      Bob Crisler
      Ashland, NE USA


      "Janwillem Borleffs" <jw@jwscripts.c om> wrote in message news:<4037fa8a$ 0$54714$ee9da40 f@news.wanadoo. nl>...[color=blue]
      > Bob Crisler wrote:[color=green]
      > > To better accommodate clients browsing by keyboard, I'd like to insert
      > > a settimeout event into the MM_jumpMenu function to cause a two-second
      > > delay before it executes. Have tried it a few ways, but no luck. The
      > > MM_jumpMenu script in question:
      > >
      > > <script language="JavaS cript">
      > > <!--
      > > function MM_jumpMenu(tar g,selObj,restor e){ //v3.0
      > >
      > >
      > > eval(targ+".loc ation='"+selObj .options[selObj.selected Index].value+"'");
      > > if (restore) selObj.selected Index=0; } //-->
      > > </script>[/color]
      >
      > <script type="text/javascript">
      >
      > function MM_jumpMenu(tar g,selObj){
      >
      > setTimeout(targ +".location='"+ selObj.options[selObj.selected Index].value+"'"
      > , 2000);
      > }
      >
      > </script>
      >
      >
      > JW[/color]

      Comment

      Working...