Welcome to WebmasterWorld Guest from 54.196.243.192

Forum Moderators: incrediBILL

Message Too Old, No Replies

Using standard HREF as Submit Button

Can this be done?

     
7:27 pm on Mar 9, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 22, 2005
posts:388
votes: 0


My life would be much easier if I could use a standard text link to submit a form...is that possible?
7:48 pm on Mar 9, 2006 (gmt 0)

Moderator from US 

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 10, 2005
posts:5551
votes: 24


You could call a JavaScript routine to submit the form when the link is clicked. But that won't work if the user has JS disabled. Not sure how it would make your life easier...
7:51 pm on Mar 9, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 22, 2005
posts:388
votes: 0


Thanks for the reply. I read via Google some sites that mentioned JS, but that wouldn't work for me. JS is too buggy. I actually logged back on to retract this thread. I've been working out the design of the site a bit more, and the text submits would actually be more confusing and potentially damaging to my database.

Thanks, though!

7:52 pm on Mar 9, 2006 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9063
votes: 2


If you want to really careful, you can use the JS on the href link, and place a backup submit button in a
noscript
block for users with Javascript disabled.
2:36 pm on Mar 10, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 7, 2003
posts:408
votes: 0


To mimic an ordinary link, you can apply some styles to your submit button.

Try this, for example:

<input type="submit" style="background-color: #fff; border: 0; text-decoration: underline; color: #00c;" name="submit" value="http://www.example.com/">