Create Button which does not Submit – Ruby on Rails

Just another quick post – how to create a button which does not submit a form when it’s clicked:

 'button', :onclick => 'alert('Button not Submitted - Hopefully!!!!'), :class => "my_class" %>

Let me know if you have any problems.



, ,



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at

%d bloggers like this: