Thread: alert function
View Single Post
  #2 (permalink)  
Old April 8th, 2004, 09:41 AM
katsarosj katsarosj is offline
Friend of Wrox
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts

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

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.