Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

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 Codewalkers Forums Sponsor:
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  
Old December 10th, 2004, 02:04 PM
lmayer lmayer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: USA
Posts: 225 lmayer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Not stopping on submit

Morning,

I have a function below, that works to check things but instead of going back to the field to fix it's going to submit instead. Any thoughts you have would be appreciated.

Thanks

Laura

<SCRIPT LANGUAGE="JavaScript">
function verify() {
var count=0;
var msg="";
for(i=0;i<=4;i++)
{
if(document.DataEntry.elements[i].value=="")
{
count=1;
msg=msg+"n"+document.DataEntry.elements[i].name;
}
else if((i>3) && (count==0))
{
return true;

}
}
for(i=0;i<=4;i++)
{
if(document.DataEntry.elements[i].value=="")
{
alert("PLEASE FILL IN THE FOLLOWING FIELD(S)n "+msg);
document.DataEntry.elements[i].focus();
return false;
}
}
}
//-->
</script>

Reply With Quote
  #2  
Old December 10th, 2004, 02:50 PM
ivo ivo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: cologne,germany
Posts: 126 ivo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Not stopping on submit

how do you call this function?
onSubmit="return verify();"
should work.

Reply With Quote
  #3  
Old December 10th, 2004, 02:52 PM
lmayer lmayer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: USA
Posts: 225 lmayer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Not stopping on submit

Yup thats what I have.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Not stopping on submit


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 6 hosted by Hostway