PDA

View Full Version : Can you find the problem in this script?


bostjank
10-20-2002, 08:31 PM
Hi!

I have 2 fileds with values that are usualy the same. So I have written a script that assigns a value in the first filed to the secodn filed whene onblur event is intialized. But I get an error message, saying there should be ; in line 4.
I have ; and don't know what's wrong.

This is the script

function Process(field) {
var Value1 = field.value;
var Value2 = document.formAdd.txtValue2.value;
If (Value2 == "") {
document.formAdd.txtValue2.value=Value1;
}
}


This is how I call the function onblur="Process(this)"

Please help,
Bostjan:thumbsup:

adios
10-20-2002, 09:16 PM
var Value2 = document.formAdd.txtValue2.value;
if (Value2 == "") {