How do I make a <div> "button" act as form submit?

Hello there. I’ve made buttons for my CMS out of divs with CSS applied to them. Is there anyway I can use the same div CSSed button as an actual working submit button for a form? I only ask, because using a normal submit form button looks out of place compared to the other nice buttons I have.

Thank you loads!
:stuck_out_tongue: Little Jim

[FONT=“Georgia”]You can style your buttons with CSS rather than trying to turn your <div>'s into buttons. The only way that would work is with javaScript.

You could also use <input type=“image” /> as a submit… that why you can make gorgeous images to act as your buttons instead.[/FONT]

These links may be useful.

http://www.wait-till-i.com/index.php?p=211

Is there anyway of making a normal hyperlink act as a submit button too? Doesn’t matter if it uses javascript.

I think the first link I offered showed you how to do it.

Here’s another one:

http://www.codeave.com/javascript/code.asp?u_log=7042
http://webdevelopment.developersnetwork.com/Articles.asp?Article=47

Thank you so much for your help people! Sorted it! And get to use my div buttons! … <a href=“javascript: document.form.submit();”></a> is the answer! Good stuff :slight_smile:

Thanks again.

Not really.

It’s best to use <input />'s, because they were MADE for forms. DIVs and Anchors shouldn’t be used.

You can use an image for your <input />.

If JS is disabled, then the form can’t be submitted.

No, no, it’s cool. This web app thing I’m making is kinda just for me. I will personally always have javascript on!

I do realise that using javascript for form submits in general, for sites used by the public, is probably not a good thing. For my own personal project though, it’s perfect.

Cheers for all your help. Much appriciated, as always.