On Jan 16, 2011, at 7:23 PM, Me wrote:

Ok I am doing it the manual way, how do I get the value to show up? Are the quotes correct?

<input id="funding_transaction_submit" name="commit" onclick="if (! confirm('Are you sure you would like ' + $ ('funding_transaction_deposit') + ' dibits deposited?') return false; return true;" type="submit" />

The simplest way to do the return true/false stuff is:

<form action="foo" method="post" onsubmit="return confirm('Are you sure?');">
...

The return false (which happens if the confirm is cancelled) stops the form submission directly. I imagine you could do the same with your onclick event on the button, but putting it in the form submission makes it pretty foolproof, since the button might not be clicked (someone types Enter and the form submits without a click).

Walter




--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to