Click here to Skip to main content
15,891,908 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: onmouseover and document.getElementById Pin
sachin_jain30-Nov-12 9:17
sachin_jain30-Nov-12 9:17 
Questiondisplaying different contentunder single layout Pin
radha123 from Hyderabad23-Nov-12 3:32
radha123 from Hyderabad23-Nov-12 3:32 
AnswerRe: displaying different contentunder single layout Pin
manojwadnere28-Dec-12 0:07
manojwadnere28-Dec-12 0:07 
QuestionRegular expression Pin
Member 962181822-Nov-12 2:25
Member 962181822-Nov-12 2:25 
AnswerRe: Regular expression Pin
n.podbielski22-Nov-12 20:00
n.podbielski22-Nov-12 20:00 
GeneralRe: Regular expression Pin
Manfred Rudolf Bihy22-Nov-12 21:20
professionalManfred Rudolf Bihy22-Nov-12 21:20 
GeneralRe: Regular expression Pin
n.podbielski23-Nov-12 21:15
n.podbielski23-Nov-12 21:15 
Questionform validation Pin
therainking7821-Nov-12 22:07
therainking7821-Nov-12 22:07 
I had this form validating now it won't even run the first function. Any suggestions?
C#
// 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
mveRichard MacCutchan21-Nov-12 22:17 
GeneralRe: form validation Pin
therainking7828-Nov-12 13:14
therainking7828-Nov-12 13:14 
AnswerRe: form validation Pin
bVagadishnu28-Nov-12 11:14
bVagadishnu28-Nov-12 11:14 
GeneralRe: form validation Pin
therainking7828-Nov-12 13:17
therainking7828-Nov-12 13:17 
Questionopeing a new window in JS after time interval Pin
WaqasCheema20-Nov-12 23:36
WaqasCheema20-Nov-12 23:36 
AnswerRe: opeing a new window in JS after time interval Pin
AnalogNerd30-Nov-12 4:51
AnalogNerd30-Nov-12 4:51 
QuestionDraw circuit diagram using javascript Pin
anishkannan18-Nov-12 22:31
anishkannan18-Nov-12 22:31 
AnswerRe: Draw circuit diagram using javascript Pin
n.podbielski19-Nov-12 21:07
n.podbielski19-Nov-12 21:07 
Answerto transfer items in select list to another select list without duplicates Pin
raviteja999200014-Nov-12 20:09
raviteja999200014-Nov-12 20:09 
QuestionHow does Yandex do its trick? Pin
Xarzu14-Nov-12 19:42
Xarzu14-Nov-12 19:42 
AnswerRe: How does Yandex do its trick? Pin
Manfred Rudolf Bihy14-Nov-12 20:44
professionalManfred Rudolf Bihy14-Nov-12 20:44 
Questiondisplay record from two different time Pin
uti123fil8-Nov-12 17:15
uti123fil8-Nov-12 17:15 
AnswerRe: display record from two different time Pin
Richard MacCutchan8-Nov-12 23:47
mveRichard MacCutchan8-Nov-12 23:47 
QuestionAdding a month to the current date Pin
SadiqMohammed6-Nov-12 23:48
SadiqMohammed6-Nov-12 23:48 
AnswerRe: Adding a month to the current date Pin
Richard Deeming7-Nov-12 2:00
mveRichard Deeming7-Nov-12 2:00 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed7-Nov-12 18:31
SadiqMohammed7-Nov-12 18:31 
GeneralRe: Adding a month to the current date Pin
Richard Deeming8-Nov-12 2:11
mveRichard 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.