# How to have confirmation dialog?

**URL:** <https://www.ruby-forum.com/t/how-to-have-confirmation-dialog/124754>\
**Category:** Rails\
**Created:** [January 2, 2008, 8:39am UTC](https://www.ruby-forum.com/t/how-to-have-confirmation-dialog/124754 "2008-01-02T08:39:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kei\_Simone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@Kei\_Simone](https://www.ruby-forum.com/u/Kei_Simone)\
**Post date:** [January 2, 2008, 8:39am UTC](https://www.ruby-forum.com/t/how-to-have-confirmation-dialog/124754/1 "2008-01-02T08:39:46Z")

</div>

Hi,

I am using the scaffold to help me build up most of a simple app

However I need a confirmation dialog.

I googled somethin abt Prototype

however i am not too sure how to use it.

I may need to enter the user’s input into the confirmation dialog.

Eg:

Form field 1: abc  
Form field 2: 123

User enters abc into Form field 1 and 123 into Form field 2 both of  
which are text\_field

Then my confirmation dialog reads

Are you sure you want to have abc as your Form field 1 and 123 as your  
Form field 2?  
OK CANCEL

Please advise.

Thanks

---

<div class="post-metadata">

**Author:** ![Kei\_Simone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@Kei\_Simone](https://www.ruby-forum.com/u/Kei_Simone)\
**Post date:** [January 2, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/how-to-have-confirmation-dialog/124754/2 "2008-01-02T15:30:21Z")

</div>

use

onsubmit  
[http://www.google.co.il/search?q=onsubmit+&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a](http://www.google.co.il/search?q=onsubmit+&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a)

and confirm  
[http://www.google.co.il/search?hl=iw&client=firefox-a&rls=com.ubuntu%3Aen-US%3Aofficial&q=+javascript+confirm&btnG=חיפוש&meta=](http://www.google.co.il/search?hl=iw&client=firefox-a&rls=com.ubuntu%3Aen-US%3Aofficial&q=+javascript+confirm&btnG=%D7%97%D7%99%D7%A4%D7%95%D7%A9&meta=)

happy diggings
