what js event?
Posted: Wed Sep 03, 2008 8:05 am
Hi
I have a form ( with 4 fields for numbers) and want a javascript function to divide the field input by 100 when we go to next field
first i need to know what event should be used
the function should be simple but i don't know how to set the argument
like:
then my fields will be:
But I'm sure it won't work. this is my first function in javascript. Please let me know the correct code
Thanks in advance
I have a form ( with 4 fields for numbers) and want a javascript function to divide the field input by 100 when we go to next field
first i need to know what event should be used
the function should be simple but i don't know how to set the argument
like:
Code: Select all
function devideby100(number){
var obj
obj = document.getElementById('myfield')
obj.value='number/100'
}Code: Select all
<input type="text" value="" OnEvent='divideby100();'Thanks in advance