On 17 February 2010 18:41, Manish Belsare <li...@ruby-forum.com> wrote:
> Sir can u guide me in implementation of Ajax calls in Ruby and Rails?
> wen i m implementing a new page it gives th following op:
>
> "try {
> Element.hide("add_answer_link_for_post_-613772418");
> Element.update("new_answer_form_for_post_-613772418", "<form
> action=\"/answers\" method=\"post\" onsubmit=\"new
> Ajax.Request('/answers', {asynchronous:true, evalScripts:true,
> parameters:Form.serialize(this)}); return false;\">\n<fieldset>\n
> <legend>New Answer</legend>\n  <textarea cols=\"40\"
> id=\"answer_ans_string\" name=\"answer[ans_string]\"
> rows=\"10\"></textarea>\n  <input name=\"commit\" type=\"submit\"
> value=\"Create\" />\n</fieldset>\n</form>\n\n");
> } catch (e) { alert('RJS error:\n\n' + e.toString());
> alert('Element.hide(\"add_answer_link_for_post_-613772418\");\nElement.update(\"new_answer_form_for_post_-613772418\",
> \"<form action=\\\"/answers\\\" method=\\\"post\\\" onsubmit=\\\"new
> Ajax.Request(\'/answers\', {asynchronous:true, evalScripts:true,
> parameters:Form.serialize(this)}); return false;\\\">\\n<fieldset>\\n
> <legend>New Answer</legend>\\n  <textarea cols=\\\"40\\\"
> id=\\\"answer_ans_string\\\" name=\\\"answer[ans_string]\\\"
> rows=\\\"10\\\"></textarea>\\n  <input name=\\\"commit\\\"
> type=\\\"submit\\\" value=\\\"Create\\\"
> />\\n</fieldset>\\n</form>\\n\\n\");'); throw e }"

You say that you get this when you have implemented a new page, but
you have not shown the code of your page.  It is therefore difficult
for anyone to suggest what is wrong.

Colin

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

Reply via email to