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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2003
    Location
    Texas
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    figuring out links with forms

    I'm trying to set up a group of similar links into "form" style
    with a pull down menu using the OPTION method

    the thing is though I want the new web page to open in a NEW window not the "_top"

    can someone give me any source code that might help ??

    thanks,
    Phil

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    You can create a sort of 'group' inside of an <select> form element using <optgroup>, this element is placed outside of your <option>.

    Here, this is a dropdown with 2 groups that opens in a new window (hoping it works), is this sort of what you are looking for?


    <form>
    <fieldset>
    <select onChange="popup=window.open('','popup');popup.location=options[selectedIndex].value;">
    <optgroup label="boys">
    <option value="http://">Tim</option>
    <option value="http://">John</option>
    <option value="http://">Rick</option>
    </optgroup>
    <optgroup label="girls">
    <option value="http://">Jane</option>
    <option value="http://">Susan</option>
    <option value="http://">Mary</option>
    </optgroup>
    </select>
    </fieldset>
    </form>

    The action is triggered by the OnChange="" javascript event handler.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #3
    New to the CF scene
    Join Date
    Apr 2003
    Location
    Texas
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Perfect, that is exactly what I was looking for

    Many Thanks


  •  

    Posting Permissions

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