sela cullens
Apr 30th 2009, 9:53 pm
hi,,
I have tried to wrote code with ascii,I'm still not understand declared ascii in javascript.so this why I'm in this forum.to know the answer.
I have one field, if I input field "05/01/" then I press "tab" from keyboard.I get year from this year, so the value in a field will be "05/01/2009".
<script language="javascript">
function GetYear(){
var now=new Date();
year=now.getFullYear();
if(document.formname.field.value.length==6){
if(ascii==9){
field.value=field.value+year;
}
}
}
</script>
if(ascii==9)
I don't know how to declare it in javascript. and I'm still dont know this function where I must put. in onKeyUp or onKeyPress or onKeyDown or onBlur??
if anyone know the answer, please give me the answer and give me a suggestion where I must put that function or any suggestion.
thanks
sela
I have tried to wrote code with ascii,I'm still not understand declared ascii in javascript.so this why I'm in this forum.to know the answer.
I have one field, if I input field "05/01/" then I press "tab" from keyboard.I get year from this year, so the value in a field will be "05/01/2009".
<script language="javascript">
function GetYear(){
var now=new Date();
year=now.getFullYear();
if(document.formname.field.value.length==6){
if(ascii==9){
field.value=field.value+year;
}
}
}
</script>
if(ascii==9)
I don't know how to declare it in javascript. and I'm still dont know this function where I must put. in onKeyUp or onKeyPress or onKeyDown or onBlur??
if anyone know the answer, please give me the answer and give me a suggestion where I must put that function or any suggestion.
thanks
sela