|
|
|
|
![]() ![]() |
May 17 2006, 07:39 AM
Post
#1
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 190 Joined: 21-October 05 Member No.: 13,185 |
I make the form tags like this:
CODE <form action="check.php" method="post"> <table> <tr> <td>Username:</td> <td><input type="text" name="user"></td> </tr> <tr> <td><input type="submit" value="set"></td> </tr> </table> </form> my question: in the tags above, it will produce a submit box, right? I want to make just text: "set" that one can click it, then link it to the form action(check.php). I thought I cannot just use <a href> right? |
|
|
|
May 17 2006, 01:37 PM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 27 Joined: 14-May 06 Member No.: 23,642 |
No you can't use <a></a> tags for submitting forms.
And for what you want I think you will have to use javascript. Unfortunatly Javascript isn't my greatest skill so I don't have a clue, try looking on hotscripts or something like that. |
|
|
|
May 18 2006, 04:59 AM
Post
#3
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,300 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() myCENT:46.50 |
One reason it would not be a good idea is because the users are familiar with certain default characteristics of Web Pages. Submit buttons on forms and underlining links are several of the standard practices which users are used to seeing. Any deviations might confuse them. For instance, they may think it strange to have a Form with no 'submit' button to use.
|
|
|
|
May 18 2006, 05:10 AM
Post
#4
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,203 Joined: 25-March 05 Member No.: 4,883 |
To add on to jlhaslip's comments, it is impossible to replace the submit box with a normal link. A normal <a href> link will simply point to the next address without passing values properly to the next generation script. Only a submit button is able to handle the form procedures correctly.
|
|
|
|
May 18 2006, 07:22 AM
Post
#5
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,232 Joined: 11-February 05 From: Heaven Member No.: 3,709 myCENT:53.83 |
It could be done but not with text but with images. Firstly you'd need to create 2 images, one which is your normal link text and one the link rollover text:
<= Normal <= Rollover And add the following code into your webpage, altering the URIs respectively: HTML <input type="image" name="submit" value="Alternative Text" src="set_normal.png" onMouseOver="this.src='set_normal_rollover.png';" onMouseOut="this.src='set_normal.png';" onClick="this.form.submit()"> . In fact come to think about it, you may even just be able to use plain text links: HTML <a href="this.form.submit()" name="submit"> Set </a> But I'm not sure. The former method should work but I haven't tested it yet. Both methods use javascript so you would need to provide a <noscript> alternative using the standard submit button. |
|
|
|
May 19 2006, 01:12 AM
Post
#6
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 190 Joined: 21-October 05 Member No.: 13,185 |
my friend who ask me to develop his site told me not to use the submit box, because it will ruin his whole design. Thank you for the advice, electriic. I'll try to do that. Also my thanks for the other posters.
|
|
|
|
May 19 2006, 01:41 AM
Post
#7
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
my friend who ask me to develop his site told me not to use the submit box, because it will ruin his whole design. Tell your friend that there are various methods of replacing buttons with graphics (that can look like text) if he's that worried about it. |
|
|
|
May 19 2006, 05:09 AM
Post
#8
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,203 Joined: 25-March 05 Member No.: 4,883 |
It could be done but not with text but with images. Firstly you'd need to create 2 images, one which is your normal link text and one the link rollover tex Ha.. What a good idea to it using images that looked like a link to replace a link. |
|
|
|
Jul 13 2006, 07:08 AM
Post
#9
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 33 Joined: 9-July 06 From: Belgium Member No.: 26,367 |
You don't need the images (save your bandwidth):
This is the script you'll need for that: CODE <script language="JavaScript"> function goForm(){ this.form.submit(); } </SCRIPT> And this is how the link should look like: CODE <A href="java script:goForm()">Set</A> (I tried to type 'JavaScript' and not 'java script', but it always changes it back.) This post has been edited by peroim: Jul 13 2006, 07:09 AM |