davidsperling
asked on
Javascript regex, timer and string-split
I need the following functionality:
-User enters a string in a textbox
-If the string matches an integer, followed by ; and then follwed by a date - then after one second split the string into integer/date and put into two separate textboxes.
Is that hard...?
(you can run index.html directly in your browser)
index.html
-User enters a string in a textbox
-If the string matches an integer, followed by ; and then follwed by a date - then after one second split the string into integer/date and put into two separate textboxes.
Is that hard...?
(you can run index.html directly in your browser)
[index.html]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>advanced js...</title>
<style type="text/css">
p{
font-style: italic;
font-size: large;
}
</style>
<script type="text/javascript">
function clrAll(){
document.getElementById("input").value="";
document.getElementById("number").value="";
document.getElementById("date").value="";
}
</script>
</head>
<body bgcolor="whitesmoke">
Please enter 666;2012-12-31 :<br/>
<input type="text" id="input" size="40"/>
<p>After one second, split input into these boxes if input matches integer;date ...:</p>
Integer goes here:<br/>
<input type="text" id="number" size="20"/>
<br /><br />
Date goes here:<br/>
<input type="text" id="date" size="20"/>
<br />
<button onclick='clrAll()'>Clear</button>
</body>
</html>
ee.pngindex.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes!
Thanks for the grade & points.
Good luck & have a Merry Christmas.
Good luck & have a Merry Christmas.
ASKER
It's just that my js kung-fu is a bit rusty.