Posts

Showing posts with the label javascript

Javascript, are variables copy by value or by reference

Just a small post to help me remember if Javascript objects are either copy by value or by reference... Copy by Value String Number  Boolean Copy by Reference: Array Object Function

IE8, Javascript Errors and console.log

Ran into an issue with IE8 and using the JQuery validation framework. Basically what was happening was that the validation framework was kicking in and identifying the errors (correct) but the form was still getting submitted to the server. (Incorrect!) Anyway after some investigation I found that it was the  console.log statements in the javascript code that was causing the issues. As I was using the developer toolbar provided with IE I wasn't seeing the issue this is because the console object gets created when you open the developer toolbar duh! So if you are getting some weird behaviour check that you don't have any console statements in you Javascript files.