SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    popup from a select list

    hi

    I'm looking for a script that will enable a pop up window to be spawned when a user clicks on a select list option. Can anyone point me in the right direction - I guess it's an "onchange" function?

    Thanks for any suggestions
    gorillaweb is a small London based digital design agency.

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2002
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try something like this...

    <script type="text/javascript">
    function popUp()
    {
    window.open(document.getElementById('select1').value, 'window_name')
    }
    </script>

    <select name="select1" id="select1" onchange="popUp()">
    <option>Select One</option>
    <option value="example.com">example.com</option>
    </select>

  3. #3
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks grahowler.

    For anyone else interested I modified grahowler's code to control window characteristics:

    function popUp() {

    window.open(document.getElementById('select1').value,'win3','toolbar=no,location=no,scrolling=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=310,height=280,top=153,left=455');

    }
    gorillaweb is a small London based digital design agency.


Bookmarks

Posting Permissions

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