45 users online (0 members and 45 guests)  


  Results 1 to 4 of 4

Related

  1. two drop down menus    Forum: Website Scripts Forum
    Replies: 10
  2. Drop Down Menus    Forum: HTML Forum
    Replies: 6
  3. Drop Down Menus    Forum: HTML Forum
    Replies: 1
  4. Drop down menus    Forum: HTML Forum
    Replies: 0
  5. drop down menus    Forum: HTML Forum
    Replies: 2
  1. #1
    gcapp's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    1

    Exclamation 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

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    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 the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    bibi's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    4

    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..

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Sorry, I need the whole page code please.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread