Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Alert box in VBScript ??

215 views
Skip to first unread message

Damian

unread,
Jul 12, 2001, 6:40:43 PM7/12/01
to
Is there a way to do a message box or alert box using VBScript in ASP or do
i need to use a Javascript alert("xyz...") ?
Thanks in advance


Bryan Martin

unread,
Jul 12, 2001, 6:50:38 PM7/12/01
to
Use the Msgbox function.

Msgbox "This is my message!", vbcritical,"Message Box"

Bryan MArtin
Sp...@ahwayside.com

"Damian" <dr...@mad.scientist.com> wrote in message
news:OvFVnNyCBHA.1708@tkmsftngp07...
: Is there a way to do a message box or alert box using VBScript in ASP or

:
:


adpx

unread,
Jul 12, 2001, 6:57:24 PM7/12/01
to
Damian,

The VBScript analog of the JavaScriptp alert() is MsgBox. Eg:

<script language="VBScript">
MsgBox "Hello, world"
</script>

That said, your reference to ASP makes the whole thing suspect: one
generally doesn't display dialogs on the ASP side of things. Also, since
only IE supports VBScript on the client-side, JavaScript is a more portable
bet.

--A


zac dna

unread,
Jul 12, 2001, 7:26:18 PM7/12/01
to
Thanks adpx, i was wondering because i find i am wanting to write error messages to the user if things are not correct, i have been using javascript alert() which works fine, i was more wondering about the possibility of using vbscript, but your point of avoiding vbscript for client side scripting is well taken, thanx

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Michael Harris

unread,
Jul 12, 2001, 8:40:03 PM7/12/01
to
alert isn't a javascript function. It's a browser DOM method - actually window.alert().

So you can use it from client side VBScript as:

alert "hello world"
window.alert "hello world"
call alert("hello world")
call window.alert("hello world")

--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"Damian" <dr...@mad.scientist.com> wrote in message news:OvFVnNyCBHA.1708@tkmsftngp07...

zac dna

unread,
Jul 12, 2001, 9:47:13 PM7/12/01
to
thanx Michael, i didn't actually realise you could access the DOM with VBScript, i thought that was only for access by javascript...
0 new messages