Tools Links Login

Popup Debug

response.write is okay for simple debugging but can become intrusive and cause formating problems itself. This simple script will display your debuging in a pop up window.

Original Author: Chris Graham

Inputs

A string to identify the debug message.
The value to be displayed in the popup window.

Assumptions

The ASP server side code generates simple client side javascript to display a popup winndow with the debug value in it.

Returns

None.

Side Affects

As this inserts client side script it can sometimes confuse the browser.

Code

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. value, debug value to display
'*
'* RETURNS: None.
'*
'* NOTES:  Asterisks are displayed each side of the debug value for clarity
'*
'* AUTHOR:  Chris Graham
'*
'*************************************************
function popupDebug(name,value)
%>

<%
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
%>

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 102 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.