homepage Welcome to WebmasterWorld Guest from 54.226.191.80
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

    
option value in firefox
cannot get firefox to do what IE does
shannie2007




msg:3585778
 2:55 am on Feb 27, 2008 (gmt 0)

I have an option box on my site and I need to direct the product that I pick to go to that product on the next page and works fine in IE but not in firefox
this is the option code
<table align="center" border="0" cellspacing="0" cellpadding="0">
<tr>

<td align="center">

<select name="MainMenu" onChange="MM_jumpMenu('parent',this,0)">
<option selected>Please Choose from here</option>
<option value="sparkling_hearts.html#1">Necklace,Earrings &amp; Bracelet Set - $40.00</option>
<option value="sparkling_hearts.html#2">Necklace &amp; Bracelet - $35.00</option>
<option value="sparkling_hearts.html#3">Necklace &amp; Earrings - $30.00</option>
<option value="sparkling_hearts.html#4">Bracelet &amp; Earrings - $20.00</option>
<option value="sparkling_hearts.html#5">Necklace - $25.00</option>
<option value="sparkling_hearts.html#6">Bracelet - $15.00</option>
<option value="sparkling_hearts.html#7">Earrings 1 - $10.00</option>
<option value="sparkling_hearts.html#8">Earrings 2 - $10.00</option>
<option value="sparkling_hearts.html#9">Earrings 3 - $10.00</option>

</select>

</td></TR></TABLE>

when I click on any of these options it just goes to the first product
<snip>

also another problem I have is opening those options in a new page as I have tried to put target_blank in the link and it does not work
thank you will appreciate any help

[edited by: BlobFisk at 9:11 am (utc) on Feb. 27, 2008]
[edit reason] Removed URL [/edit]

 

phranque




msg:3585996
 12:05 pm on Feb 27, 2008 (gmt 0)

welcome to WebmasterWorld [webmasterworld.com], shannie2007!

not sure about the url anchor.
try url encoding the pound/hash character (#) by replacing with its hex equivalent (%23).

for the target, you could change the MM_jumpMenu to make it conditional on targ to do something like:
window.open(selObj.options[selObj.selectedIndex].value, targ, "resizable=yes,scrollbars=yes,status=no");

Achernar




msg:3586034
 1:06 pm on Feb 27, 2008 (gmt 0)

Please show the code of MM_jumpMenu()

shannie2007




msg:3586092
 2:17 pm on Feb 27, 2008 (gmt 0)

sorry forgot the jump menu
<script TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>

Achernar




msg:3586300
 6:29 pm on Feb 27, 2008 (gmt 0)

function MM_jumpMenu(targ,selObj,restore){ //v3.0
if (targ=='blank') {
window.open(selObj.options[selObj.selectedIndex].value)
return
}

eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

You don't want to target "parent", since it will clear that frame, including its childrens frames and the one your page is in.

"blank" will open a new window

Possible values for targ:
* _blank: blank
* _parent: parent
* _self: self
* _top: top
* FrameName: parent.FrameName or top.FrameName (depending on the hierachy of framesets)

I've tested and the target page always scrolls to the correct position depending on the #xyz. (verify that your page actually contains the correct anchors)

phranque




msg:3586647
 12:39 am on Feb 28, 2008 (gmt 0)

just say "no" to frames...

shannie2007




msg:3589009
 10:52 pm on Mar 1, 2008 (gmt 0)

thanks guys for those answers I am trying to do both going to a new window and using the jump menu but they don't work together.
I have found another one if anyone can use it
<select onChange="window.open(this.options[this.selectedIndex].value)" name="s1?">
<option selected>choose from here</option>
<option value="sparkling_hearts.html#1">Necklace,Earrings &amp; Bracelet Set - $40.00</option>
<option value="sparkling_hearts.html#2">Necklace &amp; Bracelet - $35.00</option>
<option value="sparkling_hearts.html#3">Necklace &amp; Earrings - $30.00</option>
<option value="sparkling_hearts.html#4">Bracelet &amp; Earrings - $20.00</option>
<option value="sparkling_hearts.html#5">Necklace - $25.00</option>
<option value="sparkling_hearts.html#6">Bracelet - $15.00</option>
<option value="sparkling_hearts.html#7">Earrings 1 - $10.00</option>
<option value="sparkling_hearts.html#8">Earrings 2 - $10.00</option>
<option value="sparkling_hearts.html#9">Earrings 3 - $10.00</option>
</select>
this opens a new window in IE and Firefox but the jump menu doesn't work with this.
so if you can come up with an answer it would be much appreciated
thanks again for you help

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved