[rspec-users] webrat question, form without buttons

Jarkko Laine jarkko at jlaine.net
Wed Sep 3 16:55:52 EDT 2008


On 3.9.2008, at 19.38, Zach Dennis wrote:

> On Wed, Sep 3, 2008 at 1:31 PM, Nick Hoffman <nick at deadorange.com>  
> wrote:
>> On 2008-09-03, at 13:15, Zach Dennis wrote:
>>>
>>> On Wed, Sep 3, 2008 at 12:40 PM, Nick Hoffman  
>>> <nick at deadorange.com> wrote:
>>>>
>>>> You can submit a form using Javascript.
>>>
>>> That's why we don't have submit buttons. =)
>>>
>>> But in the context of webrat, if there is a form w/o a submit  
>>> button,
>>> how can you submit it? Obviossly, clicks_button doesn't work  
>>> anymore.
>>> Thanks,
>>
>> During regular use in a browser, how is your form submitted?
>>
>
> When the user clicks a button, but all of the handy dandy work is done
> in unobtrusive-style javascript. It's not a submit button. It's a
> CSS-made button with listeners attached,

If you're going unobtrusive, why not go all the way and have a real  
submit button there that gets replaced by the javascript with your  
custom button?

//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi




More information about the rspec-users mailing list