Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 17th, 2003, 09:25 AM
tom-hope's Avatar
tom-hope tom-hope is offline
God Among Men
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 160 tom-hope User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Q regarding VBScript and validating forms

I was wondering how to validate forms with VBScript. I want to use the onSubmit event handler and to make not submit if there was a problem

ie...in Javascript you can just put:

Code:
<body>
<script language="Javascript">
<!--
function validate(obj){
if (obj.name.value == ""){
alert("Please fill in the form");
return false;
}
return true;
}
-->
</script>
<form name="form" method="post" action="somefile.cgi" onSubmit="return validate(this)">
<input type="text" name="name">
<br><input type="submit">
</form>
</body>


But how would you give the same result using VBScript?

Thanks, Tom

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Q regarding VBScript and validating forms


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway