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:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old November 21st, 2003, 04:57 PM
tcooper tcooper is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 tcooper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PLEASE HELP ME!!

I am new to this so someone PLEASE HELP ME!!

I have a php form which I am trying to check. My code is shown below (only the piece which is questionable). This code works, however, what I want is the line I currently have commented off. If I comment off the first "if" statement (the one I don't want) I get an error saying "Object Expected". What am I doing wrong? Why will it work for the first if statement but not the second? I am new to this and I am trying to teach myself and there is just only so much a book can do for you. I really appreciate any help I can get.


<script language="JavaScript" type="text/javascript">
function checkform (form1)
{if (form1.txtJobNo.value == "C"){
//{if (preg_match("/[A-a]{2,2}[0-9]{8,8}/", form1.$jobno)){
alert ("Please enter a valid job number");
return False;}
}

<script language="JavaScript" type="text/javascript">
function checkform (form1)
//{if (form1.txtJobNo.value == "C"){
{if (preg_match("/[A-a]{2,2}[0-9]{8,8}/", form1.$jobno)){
alert ("Please enter a valid job number");
return False;}
}

Reply With Quote
  #2  
Old November 21st, 2003, 06:23 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PLEASE HELP ME!!

It looks like you are combining javascript and PHP in the javascript function which you can not do. There are javascript email validation scripts that use regular expressions to validate a properly formed email addresses, and you may be able to modify one of theose scipts to handle this validation as well.

search tthe internet for "javascript email validation"

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > PLEASE HELP ME!!


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