How to use zjrJS.Debug.mode
Used zjrJS Version:
Stable Minified version 20141202t2322 of zjrJS.
Declaration
Goal
Configure whether Debug.alert() does (set mode to any integer other than 0) or does not (set mode to 0) show an alert.
Typical usage
The developer can leave the Debug.alert() statements in their programming, and simply turn alerting on or off at the flick of a switch. Mind you, that setting Debug.mode does not change the behaviour of Debug.cack().
Member Type
Property.
Value Type
Number (typically 0 or 1).
Dependencies
None.
Example
zjrJS.Debug.mode
Goal
Configure whether Debug.alert() does (set mode to any integer other than 0) or does not (set mode to 0) show an alert.
Typical usage
The developer can leave the Debug.alert() statements in their programming, and simply turn alerting on or off at the flick of a switch. Mind you, that setting Debug.mode does not change the behaviour of Debug.cack().
Member Type
Property.
Value Type
Number (typically 0 or 1).
Dependencies
None.
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;
zjrJS.Debug.alert("This message should be seen.");
//Switch off alerting
zjrJS.Debug.mode = 0;
zjrJS.Debug.alert("This message should stay hidden.");
});
D=null;
/* ]]> */</script>