[SOLVED]buttons as links?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Gimpy
Forum Commoner
Posts: 42
Joined: Tue Jun 14, 2005 1:12 am
Location: Fort Worth, TX, US
Contact:

[SOLVED]buttons as links?

Post by Gimpy »

Is there anyway to make a submit button as a link?
Please help
Last edited by Gimpy on Thu Jun 30, 2005 6:37 pm, edited 1 time in total.
User avatar
harrisonad
Forum Contributor
Posts: 288
Joined: Fri Oct 15, 2004 4:58 am
Location: Philippines
Contact:

Post by harrisonad »

What do you mean?
- when the user click on the submit button they will go to a url?
or
- when the user clicks on a link, the form will submit?
:roll:
Gimpy
Forum Commoner
Posts: 42
Joined: Tue Jun 14, 2005 1:12 am
Location: Fort Worth, TX, US
Contact:

Post by Gimpy »

When you click it, it submits the form...
User avatar
harrisonad
Forum Contributor
Posts: 288
Joined: Fri Oct 15, 2004 4:58 am
Location: Philippines
Contact:

Post by harrisonad »

Code: Select all

<a href='javascript: frm.submit()'>Submit This Form</a>
Gimpy
Forum Commoner
Posts: 42
Joined: Tue Jun 14, 2005 1:12 am
Location: Fort Worth, TX, US
Contact:

Post by Gimpy »

Code: Select all

<a href="javascript: document.frm.submit(frm1)">Submit This Form</a>
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

<input name=&quote;&quote; type=&quote;button&quote; onClick=&quote;document.location='pizza.html'&quote;/>
Realized this may not be what you were asking.
Do you mean you want a button to act like a link?
Or do you want a link to act like a submit button?

Moved to Client-Side.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Code: Select all

<form method=&quote;get&quote; action=&quote;url to link&quote;>
<input type=&quote;submit&quote; name=&quote;link&quote; value=&quote;somevalue&quote;/>
</form>
Gimpy
Forum Commoner
Posts: 42
Joined: Tue Jun 14, 2005 1:12 am
Location: Fort Worth, TX, US
Contact:

Post by Gimpy »

Its cool, make a buton a link and harrison got it for me. thanks though.
Post Reply