-
Book Overview & Buying
-
Table Of Contents
Microsoft Dynamics CRM 2011 Scripting Cookbook
By :
All modern browsers will prompt you when your scripts are not correct. The problem is, sometimes, these messages are not necessarily the most accurate or correct. For that reason we create debug messages at certain key points in our code that can be returned. This way we can easily identify what part of our code has executed, and where we are getting stuck.
JavaScript makes a few methods available to us, some more helpful than the others in certain situations, to insert our own custom debug messages.
One option we have seen before in some of the scripts we worked on already is using an alert. This brings up a pop-up message for the user. This approach, while easy to follow, is quite disruptive if we are testing a longer script, as we will have to click on OK on each message individually. By the time we have our fifteenth message up, we can safely say it's not the preferred approach. Especially if we run the same script multiple times until we can finally figure out what causes...
Change the font size
Change margin width
Change background colour