On Mon, Dec 5, 2011 at 9:13 AM, Nike Mike
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
> Hi,
>
> In my application, we are calling a dialog box to submit a value through
> ajax.After submit how to show the welcome message in the same dialog.
>
>
> In my views file at the first the dialog block is in hidden mode.On
> clicking an anchor we are displaying the dialog block form.Through Ajax
> we are submitting the values. In my .js.erb alert messages are working
> fine.
>
> But how to place the entire layout with the dialog welcome message ?
>
> Controller :
>
> def send_message
> @message = current_user.messages.build(params[:message])
> @message.receiver_id = @user.id
> respond_to do |format|
> if @message.save
> format.html {redirect_to user_url(current_user)}
> format.js
> end
> end
> end
>
>
> send_message.js
>
> alert(@message.description)
>
try this
$(''#dialog_box_id'').html(''<%= escape_javascript
@message.description%>'')
>
> Please help us
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.