I wonder how to change this?
RJS produces different output in production
- Jockel
- Posts: 10
- Starts: 5
- Wiki Edits: 0
I am ecountering the RJS error "missing ) after argument list" and figured out that the difference between my testing environment and the hostingrails production environment is that the exact same code produces different RJS output: in production some quotation marks (") lack a required prior backslash.
I wonder how to change this?
I wonder how to change this?
- Vinayan
- Posts: 244
- Starts: 0
- Wiki Edits: 2
Hi Jockel,
Please update us with the complete logs obtained while seeing the error "missing ) after argument list". Also the wiki link given below is discussing the same "missing ) after argument list" error. Please have a look at it.
http://dev.rubyonrails.org/ticket/7381
Please update us with the complete logs obtained while seeing the error "missing ) after argument list". Also the wiki link given below is discussing the same "missing ) after argument list" error. Please have a look at it.
http://dev.rubyonrails.org/ticket/7381
2008-08-09 10:13 AM
- Jockel
- Posts: 10
- Starts: 5
- Wiki Edits: 0
Hi Vinayan,
unfortunately the link you posted doesn't work.
However, I checked the logs and nothing related to the RJS error appeared in any log - all seems to be ok.
But here is the HTML code produced by the RJS function:
<a onclick="Element.hide("new_state_link"); new Insertion.Bottom("state", "<div class='clear' id='new_state'>\n <br />\n Create a new\n state\n <!-- : -->\n <input id=\"tour[new_state]\" name=\"tour[new_state]\" type=\"text\" />\n <a href=\"#\" onclick=\"Element.remove("new_state");\n Element.show("new_state_link");; return false;\">Remove</a>\n</div>\n");; return false;" href="#">Create a new state</a>
As you can see,...Element.remove("new_state")... and ...Element.show("new_state_link")... both lack a backslash before the quotation marks - at least I output them in the same function of my production environment.
unfortunately the link you posted doesn't work.
However, I checked the logs and nothing related to the RJS error appeared in any log - all seems to be ok.
But here is the HTML code produced by the RJS function:
<a onclick="Element.hide("new_state_link"); new Insertion.Bottom("state", "<div class='clear' id='new_state'>\n <br />\n Create a new\n state\n <!-- : -->\n <input id=\"tour[new_state]\" name=\"tour[new_state]\" type=\"text\" />\n <a href=\"#\" onclick=\"Element.remove("new_state");\n Element.show("new_state_link");; return false;\">Remove</a>\n</div>\n");; return false;" href="#">Create a new state</a>
As you can see,...Element.remove("new_state")... and ...Element.show("new_state_link")... both lack a backslash before the quotation marks - at least I output them in the same function of my production environment.
2008-08-10 04:27 AM
- William
- Posts: 1052
- Starts: 32
- Wiki Edits: 56
Hi Jockel, if you're still having trouble you may need to ditch the RJS and code it manually. I'd be curious if this happens w/ all application servers (mod_rails, Mongrel, FastCGI)
2008-08-11 09:49 AM
- Jockel
- Posts: 10
- Starts: 5
- Wiki Edits: 0
Hi William,
I simply avoided to use RJS in this particular case - why bothering with such problems if a simple workaround without RJS also works?
I simply avoided to use RJS in this particular case - why bothering with such problems if a simple workaround without RJS also works?
2008-08-18 11:35 AM
- William
- Posts: 1052
- Starts: 32
- Wiki Edits: 56
Exactly - - RJS is more DRY, however, and can help with browser compatibility, etc... but not always needed.