Log in

View Full Version : Possible to make text act as submit?



sleipner
01-17-2006, 06:14 PM
I was wondering if it is possible to make a specified area of text act as a submit field so it can be formatted and spaced more with more flexibility than a regular Submit button.

I figure it may take some javascript (just a small amount), but since I dont really know javascript aside from what I've caught on here on DD, easiest thing to do was ask for forum help.

My guess is use something like
<span onclick=""> with the onclick being whatever the JS equivalent to
<input type="submit"> is...

Twey
01-17-2006, 06:43 PM
Yes. The method you want is form.submit(), where form is a form element.
Remember to be careful to provide an alternative for non-JS browsers.

mwinter
01-17-2006, 10:10 PM
I was wondering if it is possible to make a specified area of text act as a submit field [...]You could, but it would be better to make a submit button look like text using CSS. However, users do tend to recognise buttons better when they look like buttons. :)

Mike