Welcome Guest | Login

RJS produces different output in production

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?

2008-08-09 07:28 AM

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

2008-08-09 10:13 AM

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.

2008-08-10 04:27 AM

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

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?

2008-08-18 11:35 AM

Exactly - - RJS is more DRY, however, and can help with browser compatibility, etc... but not always needed.

2008-08-18 01:23 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.