Click to See Complete Forum and Search --> : Error using msgBox


BananaQuaalude
02-19-2004, 12:21 PM
I am trying to use a msgbox with the following code:

'put All Labor Data into main array
If Not RS_Graph.EOF Then
strAllLaborData = RS_Graph.GetString
arrAllLaborData = Split(strAllLaborData, Chr(13))
else
blnNoData = true
msgBox("No data for the selected report",vbOKOnly,"Report Results")
exit sub
End If


I get the following error:

An exception of type 'Microsoft VBScript runtime error: Permission denied: 'msgBox'' was not handled.


Do I have to change some setting in IIS for this to work? It seems pretty straight forward to me.

?

Ribeyed
02-19-2004, 01:03 PM
Hi,
never heard of a msgbox command in ASP. someone correct me if im wrong but msgbox is not in asp. Thats is a client side command normally found in JavaScript. ASP is all server side and cannot interact with clients browsers therefore you can't open a msgbox in the browser.

BananaQuaalude
02-19-2004, 02:31 PM
Okay, that makes sense.

So what I really need to do is call a client-side function from the server script. Without using a form element how would I do this? I want to call it straight from code.

buntine
02-19-2004, 09:52 PM
msgBox() is a valid VBScript command. Though, this command is not included in ASP as it is processed on the server.