Results 1 to 3 of 3

Thread: Open New Tab onChange selected Dropdown

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default Open New Tab onChange selected Dropdown

    How to open a new tab when we using dropdown?

    I use this script:
    <select onchange="window.open(this.options[this.selectedIndex].value,'_top')" name="website">
    <option value="" selected="selected">Choose Website</option>
    <option value="http://www.yahoo.com/">yahoo</option>
    <option value="http://www.google.com/">google</option>
    <option value="http://www.facebook.com">facebook</option>
    <option value="http://www.twitter.com">twitter</option>

    </select>
    Thank you so much
    Last edited by davelf; 09-13-2011 at 03:02 AM.
    _____________________

    David Demetrius // davejob
    _____________________

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Change the _top value to a new window.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    davelf (09-13-2011)

  4. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    thanks it solved
    _____________________

    David Demetrius // davejob
    _____________________

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
  •