# Open a modal window for registration

**URL:** <https://www.ruby-forum.com/t/open-a-modal-window-for-registration/150799>\
**Category:** Rails\
**Created:** [October 13, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/open-a-modal-window-for-registration/150799 "2008-10-13T14:31:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![medwedj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/91b2a8/32.png) [@medwedj](https://www.ruby-forum.com/u/medwedj)\
**Post date:** [October 13, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/open-a-modal-window-for-registration/150799/1 "2008-10-13T14:31:50Z")

</div>

Hello, all!

As first: am a newbie in RoR.

The problem is: I need a modal widow to show some registration fields  
for my site.

There is a main window with a button “Register” on it.  
After pressing the button the user should get a modal window with  
typical fields name, surname, username, password and so on AND two  
buttons OK and Cancel.  
After filling all the fields or pressing one of the buttons the  
controller should get the answer and all the data filled in.

As an example I got a jquery script opening a modal window. But no  
matter what I try - I cannot get it working in Ruby!! :((( In the  
example it works fine! But not in Ruby!

In attachment there is the working example. If anyone understands how it  
can be used in Ruby - please help me!

Thanx a lot in advance!

---

<div class="post-metadata">

**Author:** ![medwedj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/91b2a8/32.png) [@medwedj](https://www.ruby-forum.com/u/medwedj)\
**Post date:** [October 13, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/open-a-modal-window-for-registration/150799/2 "2008-10-13T17:32:14Z")

</div>

On Oct 13, 8:31 pm, Medwedj P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> buttons OK and Cancel.  
> Thanx a lot in advance!
> 
> Attachments:[http://www.ruby-forum.com/attachment/2807/working\_example.zip](http://www.ruby-forum.com/attachment/2807/working_example.zip)
> 
> –  
> Posted viahttp://www.ruby-forum.com/.

Not the fault of Ruby. The example you gave was purely a client-side  
scenario, although my bet is that Prototype (which comes with RoR) is  
conflicting with jQuery.

You have 3 options:

1. Ditch Prototype and use jQuery instead.

[http://erolfornoles.blogspot.com/2008/08/using-jquery-on-rails-in-3-easy-steps.html](http://erolfornoles.blogspot.com/2008/08/using-jquery-on-rails-in-3-easy-steps.html)

1. Make Prototype and jQuery play nice with each other.

[http://b.lesseverything.com/2006/12/31/making-jquery-and-prototype-play-nice-in-rails](http://b.lesseverything.com/2006/12/31/making-jquery-and-prototype-play-nice-in-rails)

1. Port your jQuery code to Prototype.
