'************************************** ' Name: Popup Debug ' Description:response.write is okay for ' simple debugging but can become intrusiv ' e and cause formating problems itself. T ' his simple script will display your debu ' ging in a pop up window. ' By: Chris Graham (from psc cd) ' ' ' Inputs:A string to identify the debug ' message. The value to be displayed in the popup window. ' ' Returns:None. ' 'Assumes:The ASP server side code genera ' tes simple client side javascript to dis ' play a popup winndow with the debug valu ' e in it. ' 'Side Effects:As this inserts client sid ' e script it can sometimes confuse the br ' owser. '************************************** Include this function into your ASP page by pasting or prerably #include ing it. '*************************************** ' ********** '* FUNCTION: popupDebug(name,value) '* '* PURPOSE: Displays a client side popup ' window with debug information '* '* INPUT:name, used to identify debug. v ' alue, debug value to display '* '* RETURNS: None. '* '* NOTES:Asterisks are displayed each si ' de of the debug value for clarity '* '* AUTHOR:Chris Graham '* '*************************************** ' ********** function popupDebug(name,value) %> <script type="text/javascript" Language="JavaScript"><!-- <!-- alert("popupDebug name=<%=name%> value=*<%=value%>*"); --> </script> <% if response.buffer=true then response.flush end function '*************************************** ' ********** %> Call it in the following way <% dim code code=1 popupDebug "code should be 1",code code=code+1 popupDebug "code should have incremented",code %>