On Jan 14, 9:29 pm, David Kahn <[email protected]> wrote: > On Thu, Jan 13, 2011 at 6:46 PM, Me <[email protected]> wrote: > > kinda hung here I have this and I am getting js in the popup. > > > <%= @deposit = javascript_tag "$('funding_transaction_deposit').innerHTML" > > %> > > <p> > > <%= submit_tag 'Create', :confirm => "Are you sure you would like > > #{@deposit} dibits deposited?" %> > > </p> > > What if you do this: > <%= submit_tag 'Create', :confirm => "Are you sure you would like " + > $('funding_transaction_deposit').innerHTML() + " dibits deposited?" %> > > Submit tag is probably going to escape any attempt at including actual javascript in the confirm text (I'd consider it a bug if it didn't). You're probably going to need to craft the button's onclick by hand (You could look at the autogenerated javascript and then replace the confirm message with something similar to what David suggested.
Fred > > > > > I want to display the value of a text box in the confirmation popup > > > -- > > 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]<rubyonrails-talk%2Bunsubscrib > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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.

