Click here to Skip to main content
12,397,547 members (60,340 online)

JavaScript

 
AnswerRe: onmouseover and document.getElementById Pin
jainsachin30-Nov-12 9:17
memberjainsachin30-Nov-12 9:17 
Questiondisplaying different contentunder single layout Pin
radha123 from Hyderabad23-Nov-12 3:32
memberradha123 from Hyderabad23-Nov-12 3:32 
AnswerRe: displaying different contentunder single layout Pin
manojwadnere28-Dec-12 0:07
membermanojwadnere28-Dec-12 0:07 
QuestionRegular expression Pin
Member 962181822-Nov-12 2:25
memberMember 962181822-Nov-12 2:25 
AnswerRe: Regular expression Pin
n.podbielski22-Nov-12 20:00
membern.podbielski22-Nov-12 20:00 
GeneralRe: Regular expression Pin
Manfred R. Bihy22-Nov-12 21:20
mvpManfred R. Bihy22-Nov-12 21:20 
GeneralRe: Regular expression Pin
n.podbielski23-Nov-12 21:15
membern.podbielski23-Nov-12 21:15 
Questionform validation Pin
therainking7821-Nov-12 22:07
membertherainking7821-Nov-12 22:07 
I had this form validating now it won't even run the first function. Any suggestions?
// JavaScript Document
function formValidation()
{
var uid = document.registration.userid;
var uname = document.registration.username;
var uadd = document.registration.address;
var uzip = document.registration.zip;
var uemail = document.registration.email;
if(userid_validation(uid))
  {
    if(allLetter(uname))
    {
      if(alphanumeric(uadd))
      {
        if(allnumeric(uzip))
        {
          if(ValidateEmail(uemail))
          {
        }
      }
    }
  }
return false;
}
function userid_validation(uid)
{
var letters = /^[A-Za-z]+$/;
var uid_len = uid.value.length;
  if (uid.value.match(letters))
    {
    return true;
    }
    else
    {
    alert("The First Name can not be empty/must         contain only letters");
    uid.focus();
   return false;
  }
}
function allLetter(uname)
{
var letters = /^[A-Za-z]+$/;
  if (uname.value.match(letters))
  {
   return true;
  }
  else
  {
  alert("The Last Name can not be empty/must  contain only letters");
  uname.focus();
  return false;
  }
}
function alphanumeric(uadd, num)
{
var uadd_len = uadd.value.length;
var numbers = /^[0-9]+$/;
if (uadd.value.match(numbers))
  {
  return true;
  }
  else
  {
  alert("Your phone number must have a 10 digits all numbers");
  uadd.focus();
  return false;
  }
}
function allnumeric(uzip)
{
var numbers = /^[0-9]+$/;
  if (uzip.value.match(numbers))
  {
  return true;
  }
  else
  {
  alert("You must fill in your ZIP code with five numeric characters");
  uzip.focus();
  return false;
  }
}
function ValidateEmail(uemail)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
  if(uemail.value.match(mailformat))
  {
  alert("Form Succesfully Submitted");
  window.location.reload();
  return true;
  }
  else
  {
  alert("You have entered an invalid email address!");
  uemail.focus();
  return false;
  }
 
}
chrishoy78@gmail.com

AnswerRe: form validation Pin
Richard MacCutchan21-Nov-12 22:17
mvpRichard MacCutchan21-Nov-12 22:17 
GeneralRe: form validation Pin
therainking7828-Nov-12 13:14
membertherainking7828-Nov-12 13:14 
AnswerRe: form validation Pin
bVagadishnu28-Nov-12 11:14
memberbVagadishnu28-Nov-12 11:14 
GeneralRe: form validation Pin
therainking7828-Nov-12 13:17
membertherainking7828-Nov-12 13:17 
Questionopeing a new window in JS after time interval Pin
WaqasCheema20-Nov-12 23:36
memberWaqasCheema20-Nov-12 23:36 
AnswerRe: opeing a new window in JS after time interval Pin
Andrew Stoute30-Nov-12 4:51
memberAndrew Stoute30-Nov-12 4:51 
QuestionDraw circuit diagram using javascript Pin
anishkannan18-Nov-12 22:31
memberanishkannan18-Nov-12 22:31 
AnswerRe: Draw circuit diagram using javascript Pin
n.podbielski19-Nov-12 21:07
membern.podbielski19-Nov-12 21:07 
Answerto transfer items in select list to another select list without duplicates Pin
raviteja999200014-Nov-12 20:09
memberraviteja999200014-Nov-12 20:09 
QuestionHow does Yandex do its trick? Pin
Xarzu14-Nov-12 19:42
memberXarzu14-Nov-12 19:42 
AnswerRe: How does Yandex do its trick? Pin
Manfred R. Bihy14-Nov-12 20:44
mvpManfred R. Bihy14-Nov-12 20:44 
Questiondisplay record from two different time Pin
uti123fil8-Nov-12 17:15
memberuti123fil8-Nov-12 17:15 
AnswerRe: display record from two different time Pin
Richard MacCutchan8-Nov-12 23:47
mvpRichard MacCutchan8-Nov-12 23:47 
QuestionAdding a month to the current date Pin
SadiqMohammed6-Nov-12 23:48
memberSadiqMohammed6-Nov-12 23:48 
AnswerRe: Adding a month to the current date Pin
Richard Deeming7-Nov-12 2:00
memberRichard Deeming7-Nov-12 2:00 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed7-Nov-12 18:31
memberSadiqMohammed7-Nov-12 18:31 
GeneralRe: Adding a month to the current date Pin
Richard Deeming8-Nov-12 2:11
memberRichard Deeming8-Nov-12 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 24 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid