vakm
11-17-2004, 11:46 AM
Hey,
I have a Jump Menu that currently works when I link it to an HTML page within the same frame or if I use JavaScript to open a new window with the URL designated in the JavaScript. The problem I'm having now, is I want to use the same JavaScript to open multiple remote windows from the Jump Menu. When I use the remote code and designate the URL within the dropdown, the dropdown does not work. But if I use it as a text link elsewhere it does. How do I write it so both functions work within the same dropdown?
Thanks in advance!
Here is what I currently have:
<SCRIPT LANGUAGE="JavaScript">
<!--
function launch(url) {
self.name = "opener";
remote = MM_popupMsg('message to users.');open(url, "fincon", "resizable,status,width=460,height=425");
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_jumpMenuGo(selName,targ,restore){ //v3.0
var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
// -->
</SCRIPT>
<body>
<select name="invest" class="menu" onChange="MM_jumpMenu('parent.frames[\'mainFrame\']',this,1)">
<option selected value="">Name</option>
<option value=""></option>
<option value="javascript:launch('http://www.url.com')">Option 1</option>
<option value="page.html">Option 2</option>
<option value="page.html">Option 3</option>
</select>
</body>
I have a Jump Menu that currently works when I link it to an HTML page within the same frame or if I use JavaScript to open a new window with the URL designated in the JavaScript. The problem I'm having now, is I want to use the same JavaScript to open multiple remote windows from the Jump Menu. When I use the remote code and designate the URL within the dropdown, the dropdown does not work. But if I use it as a text link elsewhere it does. How do I write it so both functions work within the same dropdown?
Thanks in advance!
Here is what I currently have:
<SCRIPT LANGUAGE="JavaScript">
<!--
function launch(url) {
self.name = "opener";
remote = MM_popupMsg('message to users.');open(url, "fincon", "resizable,status,width=460,height=425");
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_jumpMenuGo(selName,targ,restore){ //v3.0
var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
// -->
</SCRIPT>
<body>
<select name="invest" class="menu" onChange="MM_jumpMenu('parent.frames[\'mainFrame\']',this,1)">
<option selected value="">Name</option>
<option value=""></option>
<option value="javascript:launch('http://www.url.com')">Option 1</option>
<option value="page.html">Option 2</option>
<option value="page.html">Option 3</option>
</select>
</body>