i have a form with fields "Name.Last", "Name.First" and several other fields. The form is to be printable only. On form open i reset the fields to blanks and run a short Javascript:
====================================
var a = getField("Name.Last")
{
a.setFocus();
}
=====================================
For "Name.Last" and "Name.First" i have a short Javascript that reads:
=====================================
var a = getField("Name.Last")
if (a.value == "")
{
app.beep();
app.alert({
cMsg: "You must enter Your last name"})
a.setFocus();
}
=====================================
(var b = getField("Name.First")
On Form close i run another Javascript that goes to an empty field.
My problem is that when i open the form i get stuck in an endless loop between "Name.Last" and "Name.Last". i can disable one or the other and everything works as expected. But i WANT to have both enabled.
i have a few other issues, but i want to handle them one at a time.
Thanks,
Dave
====================================
var a = getField("Name.Last")
{
a.setFocus();
}
=====================================
For "Name.Last" and "Name.First" i have a short Javascript that reads:
=====================================
var a = getField("Name.Last")
if (a.value == "")
{
app.beep();
app.alert({
cMsg: "You must enter Your last name"})
a.setFocus();
}
=====================================
(var b = getField("Name.First")
On Form close i run another Javascript that goes to an empty field.
My problem is that when i open the form i get stuck in an endless loop between "Name.Last" and "Name.Last". i can disable one or the other and everything works as expected. But i WANT to have both enabled.
i have a few other issues, but i want to handle them one at a time.
Thanks,
Dave