Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q312 What is the simplest script for selecting an option from a drop down list and loading the page into another frame without a button?

irt.org | Knowledge Base | JavaScript | Form 10.3 | Q312 [ previous next ]

Q312 What is the simplest script for selecting an option from a drop down list and loading the page into another frame without a button?

<FORM NAME="myForm">
<SELECT NAME="mySelect" onChange="parent.FRAMENAME.location.href=document.myForm.mySelect.options[document.myForm.mySelect.selectedIndex].value">
<OPTION VALUE="http://www.yahoo.com">Yahoo
</SELECT>
</FORM>

In older browsers it requires that the user chooses a selection and then click elsewhere to trigger the onChange event handler.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.