Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jump Menu Not Working in Mozilla 1

Status
Not open for further replies.

CoffeeQuick

Programmer
Jul 6, 2004
23
0
0
GB
I have a diary of events page on a site I maintain, where you select a month to view from a drop down jump menu, which then loads the required month into an iframe.

This all works fine in IE, but not in Mozilla, you select the month, and nothing happens.

I have run the debugger in Mozilla and it seems to indicate that the problem is to do with the jump menu script created by Dreamweaver.

Code:
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

Can anyone see why this does not work in Mozilla?
Maybe you can give me the correct script that will get this to work in IE, Mozilla etc.

The web page can be seen at
Thanks

John
 
Mozilla has no idea what targ is. Change your eval line for this:
Code:
  document.getElementById( targ ).src = selObj.options[ selObj.options.selectedIndex ].value;
 
Thanks "theboyhope" the jump menu works great in both IE and Mozilla now.

You would think Dreamweaver would use that script line rather than one that seems to only work in IE!!.

I know have a new problem, my script to resize the iframe for each months data which works in IE, doesn't work in Mozilla, but I will try and work that one out for myself first before posting for help.

Thanks again

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top