I’ve got a problem with a script I put together a couple of years back — at sometime it worked, I’m not sure what might have thrown it off.
A live example of the script can be found at:
[url]http://topsitenet.com/cgi-bin/addaurl.cgi?listid=znzfzk
What’s supposed to happen is when a user selects a category, a new window opens up and allows them to select sub-categories. Well instead of loading the defined URL’s with each category, it simply loads an “undefined” url.
Below are snippets of code associated with this project.
[B]The Javascript:
function small_window(myurl) {
if(myurl.options[myurl.selectedIndex].value != “”) {
jumpto=myurl.options[myurl.selectedIndex].nvalue
var newWindow;
var props = ‘scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=300,height=200’;
newWindow = window.open(jumpto, “Add_from_Src_to_Dest”, props); }
}
[B]The HTML:
<select size=”1″ name=”level01″onchange=” javascript:small_window(this);”><option>Top-Level Category</option>
<option value=”Animals” nvalue=”
ect…
It would be great if someone could help me out with this, i’d really appreciate it. All I need the script to do is pass the nvalue url through the javascript and open it in a new window.
Thanks so much.