Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Drop down menu - javascript new window

    Hi guys,

    I am trying to create a drop down menu which will open a new window when you click on the go button. I'm having trouble getting this to work this is my code:

    <FORM NAME="charges">
    <SELECT NAME="brands" style="width:190px;">
    <OPTION SELECTED><b>Select Brand:</b>

    <OPTION VALUE="window.open('/charges/iweb_charges.html','iweb','width=500,height=300,scrollbars=no')"><b>IWEB</a>
    <OPTION VALUE="window.open('charges/tmf_charges.html','tmf','width=500,height=300,scrollbars=no')"><b>TMF</a>
    <OPTION VALUE="window.open('charges/hsdl_charges.html','hsdl','width=500,height=300,scrollbars=no')"><b>HSDL, BoS & Henderson</a>
    <OPTION VALUE="window.open('charges/lbgnom_charges.html','lbg','width=500,height=300,scrollbars=no')"><b>LBG Nominee</a>
    <OPTION VALUE="window.open('charges/corpnom_charges.html','corp','width=500,height=300,scrollbars=no')"><b>Corporate Nominee</a>

    </select>

    <INPUT TYPE="BUTTON" VALUE="Go!" onclick="window.open(document.charges.brands.value,'chargesWindow','width=500 height=300 scrollbars=no resizable=0')">

    </FORM></a>
    Any suggestions as to what I am doing wrong?

    Thanks,
    Craig

  • #2
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I figured it out, if this helps anyone in the future it is:

    <FORM NAME="charges">
    <SELECT NAME="brands" style="width:175px;">

    <OPTION VALUE="hsdl_charges.html"><b>HSDL, BoS & Henderson</a>
    <OPTION VALUE="iweb_charges.html"><b>IWEB</a>
    <OPTION VALUE="tmf_charges.html"><b>TMF</a>
    <OPTION VALUE="corpnom_charges.html"><b>Corporate Nominee</a>
    <OPTION VALUE="lbgnom_charges.html"><b>LBG Nominee</a>
    </select>

    <INPUT TYPE="BUTTON" VALUE="Go!" onclick="window.open('charges/'+charges.brands.value,'chargesWindow','width=550 height=665 scrollbars=no resizable=0')">

    </FORM></a>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •