Hello everybody,
I have a little problem here, maby you could help.. Here it is:
I have a form and few input fields in it. Every input field has some kind of numeric value. For example:
<form name="MyForm">
<input type="text" name="MyField1" value="0">
<input type="text" name="MyField2" value="20">
<input type="text" name="MyField3" value="0,0">
...
</form>
I need an onFocus event, which would check if focused field value is "0", and if it is, replace that value with ",0" (comma, zero), and put cursor in front of that text (cursor, comma, zero). If value is not 0, then it shoud leave current value and select all the string in field (all the numbers should be in blue, and replaced if any key pressed).
Could someone help me do it practically with javascript, please?
Hope you understood me, sorry for the mistakes, i'm not from english-speaking country.


