p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   alert function (http://p2p.wrox.com/showthread.php?t=11579)

mahulda April 8th, 2004 04:10 AM

alert function
 
Like the alert function in JavsScript I want to display
a similar popup Error message using VBScript.

Is there any such equivalent function ?



katsarosj April 8th, 2004 09:41 AM

You actually can use the alert function within vbscript as well. Here is an example:
-----------------------------------------
<script language="vbscript">
Sub btnAdd_onclick()
If document.FormName.TextBoxName.value = "" Then
    alert "The following fields must be entered to proceed:" & vbcrlf & "*Field that was blank."
End If
End Sub
</script>
-----------------------------------------

Of course this is the client side version. You will have to make a few changes/additions if you want to implement this in your code-behind file.

J

Snib April 8th, 2004 09:56 AM

Please note that not all browsers support VBScript. JavaScript is much more compatable

Snib

P2P Member
<><

mahulda April 9th, 2004 01:03 AM

Katsaroj
What Changes/Additions were you refering to ?



katsarosj April 9th, 2004 09:01 AM

I was referring to using the RegisterClientScriptBlock method.

J

melvik April 9th, 2004 11:05 PM

here r much experience http://p2p.wrox.com/topic.asp?TOPIC_ID=9675

Always:),
Hovik Melkomian.


All times are GMT -4. The time now is 08:38 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.