How to use zjrJS.Debug.alert()
Used zjrJS Version:
Stable Minified version 20141202t2322 of zjrJS.
There is no newer Beta version available.
Declaration
Goal
If Debug.mode != 0, the passed String is alerted using a standard window.alert(). This improves window.alert(), because you can leave your debug messages in your coding, and simply switch alerting on or off.
Typical usage
One would put alerts all over the place in their programming. Then switching Debug.mode would turn alerting on or off. That switch can be a configuration setting, or the result of pushing a button.
Member Type
Method (no return value).
Parameters
String - whatever piece of text you wish to have alerted.
Dependencies
zjrJS.Debug.mode
Example
zjrJS.Debug.alert(String)
Goal
If Debug.mode != 0, the passed String is alerted using a standard window.alert(). This improves window.alert(), because you can leave your debug messages in your coding, and simply switch alerting on or off.
Typical usage
One would put alerts all over the place in their programming. Then switching Debug.mode would turn alerting on or off. That switch can be a configuration setting, or the result of pushing a button.
Member Type
Method (no return value).
Parameters
String - whatever piece of text you wish to have alerted.
Dependencies
zjrJS.Debug.mode
Example
<script type="text/javascript" src="zjrJS.version.js" id="zjrJS"></script>
<script type="text/javascript">/* <![CDATA[ */
var D = zjrJS.Doc;
D.aE(window, "load", function () {
//Switch on alerting
zjrJS.Debug.mode = 1;
//Shout out
zjrJS.Debug.alert( "Hello, world!" );
});
D=null;
/* ]]> */</script>