.hack//GU 0 Report post Posted May 17, 2006 I make the form tags like this: <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? Notice from jlhaslip: use bbcode " [ code ] [ /code ] " tags when posting any computer code. Inserting it raw in the posting MAY break the forum formatting. Thanks. Share this post Link to post Share on other sites
Helium 0 Report post Posted May 17, 2006 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. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted May 18, 2006 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. Share this post Link to post Share on other sites
Inspiron 0 Report post Posted May 18, 2006 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. Share this post Link to post Share on other sites
electriic ink 1 Report post Posted May 18, 2006 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:  <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()">  [hr=shade].[/hr]  In fact come to think about it, you may even just be able to use plain text links:  <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. Share this post Link to post Share on other sites
.hack//GU 0 Report post Posted May 19, 2006 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. Share this post Link to post Share on other sites
Tyssen 0 Report post Posted May 19, 2006 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. Share this post Link to post Share on other sites
Inspiron 0 Report post Posted May 19, 2006 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 texHa.. What a good idea to it using images that looked like a link to replace a link. Share this post Link to post Share on other sites
peroim 0 Report post Posted July 13, 2006 (edited) You don't need the images (save your bandwidth):This is the script you'll need for that: <script language="JavaScript">function goForm(){this.form.submit();}</SCRIPT> And this is how the link should look like:<A href="java script:goForm()">Set</A>(I tried to type 'JavaScript' and not 'java script', but it always changes it back.) Edited July 13, 2006 by peroim (see edit history) Share this post Link to post Share on other sites