is this correct? my page after the action calls....shows html in my
browser...
details/detail_view.rhtml
<div id="captcha_error">
<%= error_messages_for ''post'' %>
</div>
<%= form_remote_tag :url => { :action =>
''checkcaptcha'' }, :html => {
:id => ''post_form'' } %>
<%= show_simple_captcha(:image_style => ''simply_blue'',
:label => ''To view contact information, type the content and
submit'')
%>
<%= hidden_field ''content'', ''recid'',
:value => @viewObj.id %>
<%= submit_tag "Submit"%>
<%= end_form_tag %>
controller
if simple_captcha_valid?
..stuff
end
render "details/checkcaptcha", :layout =>
"layouts/article"
details/checkcaptcha.rjs
logger.debug "success here!"
page.visual_effect :fade, ''post_form'', :duration => 0.5
page.hide ''captcha_error''
page.replace_html ''captcha_error'', ''Post
Created''
page.visual_effect :appear, ''captcha_error'', :duration =>
0.5
page.form.reset ''post_form''
........
i think my problem may have something to do with the location of my
files? i think my rails app expects my .rjs and details page to be both
in the controller folder. but i currently have my details rhtml in a
details folder outside the controller view folder. is this bad?
thanks for any help!
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
mixplate
2007-Mar-23 03:17 UTC
Re: need help with rjs for captcha? simple for you not for m
nevermind, found the problemo! since i was using a different layout to render...i forgot to add the javascript in the new layout!... -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---