Welcome to WebmasterWorld Guest from 54.196.224.166

Forum Moderators: incrediBILL

Message Too Old, No Replies

Using standard HREF as Submit Button

Can this be done?

     

inveni0

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

5+ Year Member



My life would be much easier if I could use a standard text link to submit a form...is that possible?

LifeinAsia

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

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



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...

inveni0

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

5+ Year Member



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!

encyclo

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

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



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.

tombola

2:36 pm on Mar 10, 2006 (gmt 0)

10+ Year Member



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/">