Data Function is Its Not working IN IE8
Posted on
16th Feb 2014 07:03 pm by
admin
This is my first time to use formums. I hope i can get solution for this problem.
view plaincopy to clipboardprint?
function Clientcalculateage() { var varClientDOB = new Date(document.getElementById("txtClientDOB").value); var dobYear = varClientDOB.getFullYear(); var dobMonth = varClientDOB.getMonth(); var dobday = varClientDOB.getDay(); if (!isNaN(dobYear) && !isNaN(dobMonth) && !isNaN(dobday)) { var age = displayage(dobYear, dobMonth, dobday, "years", 0, "rounddown"); if (Number(age) < 2) { age = displayage(dobYear, dobMonth, dobday, "months", 0, "rounddown"); document.getElementById("txtClientAge").value = age; } else { document.getElementById("txtClientAge").value = age; } } else { alert("please enter a numeric value"); document.getElementById("txtClientAge").value = "DD/MMM/YYYY" document.getElementById("txtClientAge").focus(); } } function Clientcalculateage()
{
var varClientDOB = new Date(document.getElementById("txtClientDOB").value);
var dobYear = varClientDOB.getFullYear();
var dobMonth = varClientDOB.getMonth();
var dobday = varClientDOB.getDay();
if (!isNaN(dobYear) && !isNaN(dobMonth) && !isNaN(dobday))
{
var age = displayage(dobYear, dobMonth, dobday, "years", 0, "rounddown");
if (Number(age) < 2)
{
age = displayage(dobYear, dobMonth, dobday, "months", 0, "rounddown");
document.getElementById("txtClientAge").value = age;
}
else
{
document.getElementById("txtClientAge").value = age;
}
}
else
{
alert("please enter a numeric value");
document.getElementById("txtClientAge").value = "DD/MMM/YYYY"
document.getElementById("txtClientAge").focus();
}
}view plaincopy to clipboardprint?
Did you know?Explore Trending and Topic pages for more stories like this.
This is my Javascript Function I call this function in Onchage Event.
When I change the date in CalenderExtender Control. Its working fine in FireFox Browser. but Its not working in IE8.
I don't know y? i try my solution but its not workin. finally i come to forums. Any one plz help me
No comments posted yet
Your Answer:
Login to answer
309
42
Other forums
UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0
When using connection method: Cache with live
Most basic form question ever?
Hello,
I want to use this snippet to make sure the fields in a form are ok before processing
Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:
Quick variable question
hey guys/gals,
im trying to write a php script and it works fine as i have it, but i need to set
Why does my crawler script suddenly end with no error?
Hi.
I have written a web crawler script. It will visit a large number of URL's with cURL.
Need help-Error istream header declaration
Hi Everyone ,
I am having issue with istream declaration. I am new to C programming.
can a
Word filter problem
Hello,
im trying to make a filter for words inputted in to my website but i want to store the
Displaying image from database
Hi,
I've got a site where that's got a database behind it. Currently it has loads of items in
socket makes browser hang...
I have a socket server, and I am having a problem at the moment...
A browser sends a http hea
What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin