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!

frames and dropdowns.......

Status
Not open for further replies.

chrisparr21681

Programmer
Nov 18, 2002
17
GB
ok i am working in frames (mistake i know), but i need to open the page selected from a dropdown automatically into my frame, the frame also needs to start on a default page so its not blank...

This is the code for the dropdown, how can get the frame to have the selected option?

function formHandler(form)
{
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}

<form name="form">
<select name="site" size=1 onChange="javascript:formHandler()">
<option value=" >Getting Started...
<option value=" </select>
</form>
 
I'm assuming the drop-down is in a frame that is a sibling of the target frame (both frames exist within the same frameset)? If so, try changing this:

window.location.href = URL;

to this:

parent.yourTargetFrameName.location.href = URL;

Adam
while(ignorance){perpetuate(violence,fear,hatred);life=life-1};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top