Javascript eval limits

Posted by user117701 on Stack Overflow See other posts from Stack Overflow or by user117701
Published on 2010-04-22T18:01:46Z Indexed on 2010/04/22 18:03 UTC
Read the original article Hit count: 221

Filed under:

Is there a limit to javascript's eval, like in lenght?

I'm trying to build an app where you can store JS code in the DB, which you can later load and eval in order to execute it, but i'm reaching a limit. First of all, the code has to all be in one line. Any multiline statements are not executed. Next, i'm reaching a limit in length (i guess). If i execute the code manually, it works, but put that same code in the db, load it via ajax, and try to execute it, and it fails.

Any ideas why?

© Stack Overflow or respective owner

Related posts about JavaScript