scriptygoddess

25 Jan, 2008

Have button (input element) go to new page with onclick

Posted by: Jennifer In: Javascript

This is probably considered "Javascript 101" – but I still had a bit of trouble finding just the right syntax to work. Simply needed a button to open a new page (in the same browser window):

<input type="button" value="THERE REALLY ARE OTHER SEARCH ENGINES!"
onclick="location.href='http://www.yahoo.com'; return false" />

Related posts:

  1. open_basedir restriction in effect error on WordPress page This is the second time I've run into this problem....
  2. Multi-Row Carousel and Image Loader with JQuery A recent project I've been working on involved a portfolio...
  3. Striping IMG tags from the_content in WordPress (and how to fudge page excerpts) Background: For a site I was working on, I was...

Related posts brought to you by Yet Another Related Posts Plugin.

No Responses to "Have button (input element) go to new page with onclick"

Comment Form

Featured Sponsors


  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL
  • Jennifer: So I was testing this out to see if maybe something changed in the latest version - I had a test wordpress setup - and just dumped the mycomment funct

About


Advertisements