"document.forms.options[i].selected" problem with Netscape 4.7
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anthony_Nguyen
Posted On:   Wednesday, May 22, 2002 10:06 AM

Please tell me why my script doesn't work with Netscape 4.7, but work well with IE and Netscape 6.2. Thank you very much. My script: function check(){ if (document.titleform.product.options [0].selected) { window.location.href = '/allproducts.asp'; } if (document.titleform.product.options[1].selected) { window.location.href = '/bluesave/index.asp'; } return true; } //--> ]]>]]> My form: All Products Blue Save    More>>

Please tell me why my script doesn't work with Netscape 4.7, but work well with IE and Netscape 6.2. Thank you very much.


My script:

			





My form:

			





   <<Less

Re: "document.forms.options[i].selected" problem with Netscape 4.7

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, May 23, 2002 01:18 AM

use selectedIndex property as below;



your code is:

if(document.titleform.product.options[1].selected)


but try to use:

if(document.titleform.product.selectedIndex==1)

About | Sitemap | Contact