|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Hey everyone,
Got a quick question for you all. I'm trying to go a form validation by using the onsubmit event. The onsubmit event works fine and a little msgbox appears when they do not select something in the drop down boxes, but the problem is that the msgbox re-appears after you hit "ok" the first time. Anybody have any idea why? Here is my code: <script language="vbscript"> dim validation Function MyForm_OnSubmit validation = true If (Document.myForm.Num.Value) = "" Then MsgBox "Please select a document number." validation = False End If If (Document.myForm.Originator.Value) = "" Then MsgBox "Please select an originator." validation = False End If If validation = True Then MyForm_OnSubmit = True Else MyForm_OnSubmit = False End If End Function </script> <form action="addNew.asp" name="myForm" method="post" onSubmit="MyForm_OnSubmit"> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Message Box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|