onclick in submit_tag ?

Ram wrote:

    I have a submit_tag in test.rhtml
    I want to add the following popup box onclick:

                 "Are you sure?"
  

you can just use the :confirm param at the form_tag. You only have to provide the string for the confirm box and that's it (i.e. :confirm=>'Are you sure?')

That will display the standard javascript confirm. In case you want a nicer popup then you should implement yours by using a javscript function returning true/false and to call it you can just pass the :onsubmit param to the form.

regards,

j