By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,729 Members | 1,490 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,729 IT Pros & Developers. It's quick & easy.

MM_jumpMenu delay modification - Can anyone help?

P: n/a
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="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Bob Crisler wrote:
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="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0; } //-->
</script>


<script type="text/javascript">

function MM_jumpMenu(targ,selObj){

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

</script>
JW

Jul 20 '05 #2

P: n/a
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.com> wrote in message news:<40***********************@news.wanadoo.nl>.. .
Bob Crisler wrote:
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="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0; } //-->
</script>


<script type="text/javascript">

function MM_jumpMenu(targ,selObj){

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

</script>
JW

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.