Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msgbox question

Status
Not open for further replies.

sabev

Programmer
Sep 27, 2002
47
US
Hi All,

I have a number of .asp pages containing VBscript. Is there a way to insert a msgbox in these to display some quick info for debugging purposes? I have tried a message box and nothing happens likewise with a jscript alert function thus –

%>
<html>
<script type=&quot;Javascript&quot;>
alert(&quot;test&quot;);
</script>
</html>
<%

Thanks
 
You can't fire alerts and messageboxs on the server side. I usually response.write/response.end to see where my program is as certain places during execution.

response.end will stop your execution at that point - if an error is happening you need to reponse.end before the error executes.

Good Luck!
 
Javascript (alert) and VBScript (msgbox) are client side scripting functions and cannot be called within asp. USe response.write and then response.end, that will output to the screen debug code.

If there are no errors on your page or use use a on error resume next then you could do something like the following:

<html>
<script type=&quot;Javascript&quot;>
alert(&quot;<%=yourdebugmsg%>&quot;);
</script>
</html>
&quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
Thanks guys, I was kinda worried that I was barking up the wrong tree. Got Visual Basic on the brain. Enough differences to hang me up.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top