• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Validate a specific date range

Validate a specific date range 12 years 1 week ago #17264

  • deziner76hd
  • deziner76hd's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Hello,
I would like to have a specific date range in years entered into a text box and if anything else is entered a pop up alert would appear. The date range would be from 1912 to 2002. Any help with this would be greatly appreciated.

This is the Javascript I am trying to use:
<script type="text/javascript">
function checkDate(theForm) 
year=document.getElementById('YearBorn').value;
if(year<1912 || year>2002)
{
  alert("registration is restricted to those born between 1912 to 2002");
  return false;
  else {
  return true;
}
}
</script>

I have included this code in the Additional Attributes:
onblur="return checkDate(this);"


Can anyone tell me what I am doing wrong and why this doesn't work?

Thank you
DeZiner
Where there's a will there's a way
Last Edit: 12 years 1 week ago by deziner76hd. Reason: Change dates
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!