peterinwa
04-09-2004, 03:25 PM
I have had a problem reported by users over a period of three years. I'm sure everyone that sees it doesn't report it, but with 8,000 visitors a day it only gets reported about once every three months so it is very obscure. Computers/program errors are usually consistent so this confuses me.
I have an <input box where users enter M or F to indicate their sex. If they don't do it correctly, they get an alert message. The problem is that they swear they have entered M or F but still get the message.
Now today for the first time a user tells me the <input box contains: onChange='parent.create.setSex(this)'
Here is all the relevant code:
function setSex(a){Sx=a.value;
if (Sx!="m" && Sx!="M" && Sx!="f" && Sx!="F"){alert("Please enter M or F to indicate your Sex.")}
if (Sx=="m"){Sx="M"; parent.image.document.f1.sx.value="M"}
if (Sx=="f"){Sx="F"; parent.image.document.f1.sx.value="F"}
// Sex box
c+="<tr><td align=center class='formfields'>";
c+="Sex: ";
c+="<input type=text name=sx value="+Sx+" onChange='parent.create.setSex(this)' ";
c+="size=1 maxlength=1 class='formfields' border=1>";
c+=" ";
// Age box
c+="Age: ";
c+="<input type=text name=ag value="+Ag+" onChange='parent.create.setAg(this)' ";
c+="size=3 maxlength=4 class='formfields' border=1>";
c+=" ";
Note that the age box is coded similarly but it has never caused a problem.
Up until a week ago I used & where you now see &&. I posted here and learned the difference but evidently it wasn't the problem.
Thanks for any ideas, Peter
I have an <input box where users enter M or F to indicate their sex. If they don't do it correctly, they get an alert message. The problem is that they swear they have entered M or F but still get the message.
Now today for the first time a user tells me the <input box contains: onChange='parent.create.setSex(this)'
Here is all the relevant code:
function setSex(a){Sx=a.value;
if (Sx!="m" && Sx!="M" && Sx!="f" && Sx!="F"){alert("Please enter M or F to indicate your Sex.")}
if (Sx=="m"){Sx="M"; parent.image.document.f1.sx.value="M"}
if (Sx=="f"){Sx="F"; parent.image.document.f1.sx.value="F"}
// Sex box
c+="<tr><td align=center class='formfields'>";
c+="Sex: ";
c+="<input type=text name=sx value="+Sx+" onChange='parent.create.setSex(this)' ";
c+="size=1 maxlength=1 class='formfields' border=1>";
c+=" ";
// Age box
c+="Age: ";
c+="<input type=text name=ag value="+Ag+" onChange='parent.create.setAg(this)' ";
c+="size=3 maxlength=4 class='formfields' border=1>";
c+=" ";
Note that the age box is coded similarly but it has never caused a problem.
Up until a week ago I used & where you now see &&. I posted here and learned the difference but evidently it wasn't the problem.
Thanks for any ideas, Peter