Thread: help with two drop down menus
Results 1 to 4 of 4
Related
-
two drop down menus Forum: Website Scripts Forum
Replies: 10 -
Drop Down Menus Forum: HTML Forum
Replies: 6 -
Drop Down Menus Forum: HTML Forum
Replies: 1 -
Drop down menus Forum: HTML Forum
Replies: 0 -
drop down menus Forum: HTML Forum
Replies: 2
-
03-30-2004, 12:11 PM #1
help with two drop down menus
I am trying to get two separate drop down menus to work but i am having problems.
I have this code for the first menu:
<form name="form1" >
<select name="agency" size="1" style="background-color:#FFFFD7" onChange="displaydesc(document.form1.agency.selectedIndex)">
<option selected value="http://www.usda.gov/" target="newwin">Department of Agriculture </option>
<option selected value="http://www.state.gov/" target="newwin">Department of State </option>
</select>
<input type="button" value="Go"
onClick="jumptolink(document.form1.agency.selectedIndex)"><br>
<span id="descriptions" align="left" style="font:italic 13px Arial">
</span>
</form>
<script>
function jumptolink(what){
var selectedopt=document.form1.agency.options[what]
if (document.getElementById && selectedopt.getAttribute("target")=="newwin")
window.open(selectedopt.value)
else
window.location=selectedopt.value
}
document.form1.agency.options[0].selected=true
-------------------------------------------------------------------
however, if i try to put the same code at the bottom of my page and chnage the form name to say "form2", it will not work correctly.
Can some help me to get two drop downs to work on the same page????
Gary
-
03-30-2004, 12:17 PM #2
Hi,
It could be a layout problem. Could I see the whole page where you have tried it at the bottom, possibly a link?If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
03-30-2004, 12:30 PM #3
Hi!
<form name="hide_form" >
<img src="help_btn.gif" onClick="JavaScript:win()" height="40" width="40">
</form>
i use smarty... and php...
it works fine on Mozilla... the problem withIE is that the child window doesn't close ... it just loose the focus...
maybe IE doesn't support onBlur
thank you..
-
03-30-2004, 12:54 PM #4
Sorry, I need the whole page code please.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum