38 users online (2 members and 36 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 2
  2. Jump Menu covers drop down menu    Forum: HTML Forum
    Replies: 1
  3. tab popup sub-menu    Forum: Javascript Forum
    Replies: 1
  4. Pulldown menu blocks my popup menu    Forum: HTML Forum
    Replies: 9
  5. Open New Window from Menu    Forum: Javascript Forum
    Replies: 6
  1. #1
    moxieweb's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2009
    Posts
    2

    How do I make a drop down menu open a popup?

    I have created a drop down menu with the US states and Canadian provinces that when you click on them, a new window opens with the pertinent information.
    http://www.fleckvieh.com/index2.htm is the link where the drop down menu is.

    I would like it so that when you click on a particular state, what will happen is that the clicking on the state will produce a popup window of a specific size that I would like to give with the content, rather than opening into another web page.

    Is this possible? If so, does anyone know how to code this? Thanks.

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: How do I make a drop down menu open a popup?

    You can assign the link an onclick event, and instruct the event to open a new window at a settings of your desire.

    For example, this is your normal link:
    Code:
    <a href="http://www.google.com">Google</a>
    ...just add:
    Code:
    <a href="http://www.google.com" onclick="window.open(this.href,'window_name','width=200,height=200');return false;">Google</a>
    For further reading:
    http://www.javascript-coder.com/wind...dow-open.phtml
    https://developer.mozilla.org/En/DOM/Window.open

    Hope it helps.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  3. #3
    moxieweb's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2009
    Posts
    2

    Re: How do I make a drop down menu open a popup?

    This works great for regular links but not for a jump menu, see code below. I need the states/al.htm and states/ar.htm to open into a pop up:

    <select name="jumpMenu" class="dropDown2" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
    <option selected="selected">Find A Breeder Near You</option>
    <option>:: USA ::</option>
    <option value="states/al.htm">Alabama (AL)</option>
    <option value="states/ar.htm">Arkansas (AR)</option>

    </select>
    </form>

  4. #4
    MoreTasteful's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2009
    Posts
    5

    Re: How do I make a drop down menu open a popup?

    This works great i use it


    <form name="jump">
    <select name="menu">
    <option value="#">Website links</option>
    <option value="http://blog.bloodlineshq.com">Blog</option>
    <option value="http://photos.bloodlineshq.com">photos (under construction)</option>
    <option value="http://bloodlineshq.com/Powers/Achievments.html">Achievments</option>
    <option value="http://bloodlineshq.com/Powers/Stratagy.html">Stratagy guides</option>
    <option value="http://bloodlineshq.com/powers/guide.html">Dtks lvl 1 guide</option>
    <option value="#>Powers</option>
    <option value="http://bloodlineshq.com/powers/Mystical.html">Mystical</option>
    <option value="http://bloodlineshq.com/powers/Physical.html">Physical</option>
    <option value="http://bloodlineshq.com/powers/Sencory.html">Sencory</option>


    </select>
    <input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
    </form>



Tags for this Thread