JavaScript eval() Function
Well, this is a javascript function that most of the web programmers must have come across, but still we overlook it. Although this function is very powerful. So lets digg into this function and make our life simpler. First some Gyan about eval: The JavaScript EVAL command can be very powerful when using dynamic content in Web-based applications. EVAL can reduce code and eases interaction with data that is unknown at load time. As EVAL allows you to dynamically create and execute JavaScript, you can use it to reduce the number of lines of code you need to use; you can also use it to create JavaScript to perform activities that would be significantly more difficult without using the command. In many cases, you can move this functionality out of a single page and convert it into a generic function that you can reuse thanks to the EVAL function. eval , evaluates and/or executes a string of JavaScript code that is contained in the codestring argument. First, eval determines if the arg...