PDA

View Full Version : Resolved Drop-down Menu



Rain Lover
01-17-2010, 10:53 AM
Hi,

Please look at the following drop-down menu:
http://www.w3schools.com/JS/tryit.asp?filename=tryjs_selectmenu

1. How can I set it so the pages open in the parent frame (instead of the same frame)?
2. How can I set it so the pages open in a new window?


Regards
Rain Lover

Nile
01-17-2010, 04:04 PM
Parent frame:


window.parent.location=document.getElementById("menu").value;
[/code]

New window:


window.open(document.getElementById("menu").value, document.getElementById("menu").firstChild.nodeValue);

Rain Lover
01-18-2010, 07:47 PM
It seems that the following work too:

parent frame:

parent.location=document.getElementById("menu").value;


a new window:

window.open(document.getElementById("menu").value);



If there's something wrong with them, please do let me know.

Nile
01-20-2010, 01:00 PM
Nothing wrong...

Rain Lover
01-20-2010, 01:47 PM
Thanks Nile! :)

Nile
01-20-2010, 10:31 PM
Glad to help you! Your welcome!

It seems your topic is solved... Please set the status to resolved.. To do this:
Go to your first post ->
Edit your first post ->
Click "Go Advanced" ->
Then in the drop down next to the title, select "RESOLVED"