Welcome visitor
* Login
* Register
It is currently March 26th, 2019, 10:28 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 4 posts ] 
Author Message
  Link with a button
PostPosted: October 13th, 2009, 1:21 pm 

Posts: 14
I think you all are familiar with links and form and buttons, can you show me how to create a link using a button (in any page, not for a form)?


Top
 Profile  
 
  Re: Link with a button
PostPosted: October 13th, 2009, 2:00 pm 
User avatar

Posts: 136
http://www.scriptingok.com/forum/t5_921-Other-kind-of-links


Top
 Profile  
 
  Re: Link with a button
PostPosted: October 13th, 2009, 5:44 pm 
User avatar

Posts: 21
I know of two ways for accomplishing what you want:

Using JavaScript
<input type="button" value="Blah Blah" onClick="window.location.href='destination.html';" />
<!-- This one will open the link in the current window -->

or
<input type="button" value="Blah Blah" onClick="window.open('destination.html');" />
<!-- This one will open the link in a new window -->


Without JavaScript
<form action="destination.html">
  <input type="submit" value="Blah Blah" />
</form>



REGARDS

_________________
IT. Consulting
www.tnogos.com


Top
 Profile  
 
  Re: Link with a button
PostPosted: October 14th, 2009, 12:55 am 

Posts: 16
or
<input type="button" onclick="window.location='http://www.scriptingok.com';" value="link" />

or simply enough :mrgreen:
<a href="http://www.scriptingok.com"><input type="button" value="scriptingok" /></a>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron