Sumbit button as normal link
Moderator: General Moderators
Sumbit button as normal link
Hi. How would you make a normal a href link be a submit button in a form?
EDIT: or a submit button as an image or text?
EDIT: or a submit button as an image or text?
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
try this:
http://www.codetoad.com/html/buttons/im ... button.asp
Code: Select all
<input type=image src=whatever.jpg>-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
and if you want jsut a text link to submit, you can do
Code: Select all
<a href="#" onclick="javascript:document.formname.submit();">Submit</a>- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
To use an image as a submit button:
The submission sends two $_POST (or $_GET) vars: Okay_x and Okay_y which indicate the coordinates within the image at which the button was clicked, so you need to check for the button like:
Code: Select all
<input type=image src="okay.gif" name="Okay">Code: Select all
<?php
if (isset($_POST['Okay_x']))
?>