When you click [x] the close button, will show the alert with 3 button
like below picture:

Show dialog message
Do you want to save changes?
All details will be lost if you don't save them.

Dont' save | cancel | save


I am using jquery colorbox, the code as below:

<a class='inline' href="#inline_content">[X]</a>
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>

<b>Do you want to save changes?</b>
All details will be lost if you don't save them.
<%= link_to "Don't Save", main_screen_main_path %> |
<a href="javascript:parent.$.colorbox.close()">cancel</a> |
<%= submit_tag "save" %>


$(".inline").colorbox({inline:true, width:"500"});

When I click "Save" button, it does't works...
What code should I write like :onsubmit => ?? ?
(I am weak for javascript)..


Posted via http://www.ruby-forum.com/.

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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 9 | next ›
Discussion Overview
grouprubyonrails-talk @
postedJan 12, '12 at 5:23a
activeJan 14, '12 at 11:31a

2 users in discussion

Joachim Cheng: 5 posts Javier Quarite: 4 posts



site design / logo © 2022 Grokbase