Forums
This topic is locked
Javascript Woes
Posted 19 Feb 2002 07:15:54
1
has voted
19 Feb 2002 07:15:54 Stuart Chase posted:
I got this code online. It almost totally encompases what I want to do.I have a jump menu that pulls values from a database. I would like it to either by onchange, or by clicking go to popup a window that I can size (no scrollbars, etc) to show an anchored window. Heres the code I have so far, but I can't get it to popup, it loads the target in full page.
Thank you in advance for your help.
<script language="JavaScript">
<!--
function gotohref(theSelect) {
thehref = theSelect.options[theSelect.selectedIndex].value;
window.location.href = thehref;
}
// -->
</script><FORM NAME="findit">
<select size=1 onChange="gotohref(this);">
<option SELECTED>Navigate Our Site
<% Do While Not rs.EOF %>
<option value="missionlist.asp#<% = rs("mission" %>">
<% = rs("mission" %>
</option>
<% rs.movenext %>
<% loop %>
</select>
<br></p>
</select>
</body>
</html>
<%
rs.Close()
%>
Replies
Replied 19 Feb 2002 15:29:29
19 Feb 2002 15:29:29 Stuart Chase replied:
Got it if anybody wants the code.
Jump Menu - filled by database - javascript to launch anchored page as a popup.
<script language="JavaScript">
<!--
function gotohref(theSelect) {
thehref = theSelect.options[theSelect.selectedIndex].value;
window.open(thehref,'','width=600,height=450,top=95,left=95');
}
// -->
</script><FORM NAME="findit">
<select size=1 onChange="gotohref(this);">
<option SELECTED>Navigate Our Site
<% Do While Not rs.EOF %>
<option value="missionlist.asp#<% = rs("mission" %>">
<% = rs("mission" %>
</option>
<% rs.movenext %>
<% loop %>
</select>
<br></p>
</select>
</body>
</html>
Jump Menu - filled by database - javascript to launch anchored page as a popup.
<script language="JavaScript">
<!--
function gotohref(theSelect) {
thehref = theSelect.options[theSelect.selectedIndex].value;
window.open(thehref,'','width=600,height=450,top=95,left=95');
}
// -->
</script><FORM NAME="findit">
<select size=1 onChange="gotohref(this);">
<option SELECTED>Navigate Our Site
<% Do While Not rs.EOF %>
<option value="missionlist.asp#<% = rs("mission" %>">
<% = rs("mission" %>
</option>
<% rs.movenext %>
<% loop %>
</select>
<br></p>
</select>
</body>
</html>