www.webdeveloper.com
Results 1 to 5 of 5

Thread: onchange and target ???

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    8

    Question onchange and target ???

    I have the following scripts:
    Code:
    <select name="jumpit" onchange="document.location.href=this.value" style="color: #0000CC; background-color: #FFFFCC" size="1"><option selected value="#">Bookmark this site</option>	
    	<option value="#">----------</option>
    <option value="http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=&Title=">BlinkList</option>
    
    <option value="http://blogmarks.net/my/new.php?mini=1&title=&url=">Blogmarks</option>
    
    <option value="http://del.icio.us/post?url=&title=">del.icio.us</option>
    
    <option value="http://digg.com/submit?phase=2&amp;url=">Digg</option>
    
    <option value="http://myfavorites.earthlink.net/my/add_favorite?v=1&url=&title=" target="_blank">Earthlink</option>
    
    <option value="http://www.facebook.com/sharer.php?u=">Facebook</option>
    
    <option value="http://www.furl.net/storeIt.jsp?t=&u=">Furl</option>
    
    <option value="http://www.google.com/bookmarks/mark?op=edit&bkmk=&title=">Google</option>
    
    <option value="http://ma.gnolia.com/bookmarklet/add?url=&title=">ma.gnolia</option>
    
    <option value="http://www.mister-wong.com/index.php?action=addurl&bm_url=&bm_description=">Mr. Wong</option>
    
    <option value="http://www.netscape.com/submit/?U=&T=">Netscape</option>
    
    <option value="http://www.netvouz.com/action/submitBookmark?url=&title=&popup=no">Netvouz</option>
    
    <option value="http://www.newsvine.com/_wine/save?popoff=0&u=&h=">Newsvine</option>
    
    <option value="http://www.rawsugar.com/pages/tagger.faces?turl=&tttl=">RawSugar</option>
    
    <option value="http://reddit.com/submit?url=&title=">reddit</option>
    
    <option value="http://simpy.com/simpy/LinkAdd.do?note=&href=">Simpy</option>
    
    <option value="http://www.spurl.net/spurl.php?url=&title=">Spurl</option>
    
    <option value="http://www.stumbleupon.com/submit?url=&title=">StumbleUpon</option>
    
    <option value="http://www.wink.com/_/tag?url=&doctitle=">Wink</option>
    
    <option value="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=&u=">Yahoo MyWeb</option>
    
    	<option value="#">-------------</option>
    </select>
    Whenever I select an option,it opens in the same window !

    I want it to open in a new window like _blank.
    Please tell me how can I do it.

    Thanks
    Tony
    Last edited by jedaisoul; 03-31-2014 at 05:38 AM. Reason: code tags added

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Try changing the first line to:
    HTML Code:
    <select name="jumpit" onchange="window.open(this.value)" style="color: #0000CC; background-color: #FFFFCC" size="1">
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    And remember that you will also need a proper form and a simple little server side script to keep this working for the vast numbers who do not use JavaScript.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Aug 2009
    Posts
    8
    Hi BearMay & Charles,

    It works.
    Thanks very much.

    Tony

  5. #5
    Join Date
    Nov 2011
    Posts
    145
    I'm having the same problem. but i have different code then this person.

    http://www.cjwebconsulting.com/newde...tinations.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles