[Seaside] jQuery Dummy

Lukas Renggli renggli at gmail.com
Thu Jan 7 20:21:16 UTC 2010


>> - What does "turn a div into a submit button" mean?
>
> We didn't want to use a html submit button because apparently they are
> hard to style consistently across browsers. We wanted to stay away
> from using  imageButtons as well ( but that's what we're currently
> doing )

In this case I would use #button instead of #submitButton. An
alternative would be to use an #anchor, but I would refrain from using
a #div for actions. Search engines, mobile users and people with
cognitive disabilities will thank you :-)

> So what I mean is, we take a div and style it to look like a button
> and make it clickable. I want the exact functionality of a submit
> button though, i.e. the ability to assign callbacks, and it should
> submit a form.

The simplest thing you can do from within the form is:

     html div onClick: 'submit()'; with: 'Submit'

That doesn't use AJAX and doesn't require an external Javascript library.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list