(see Hugo, you spole to soon :) )
I'm playing with HTML forms where the controls (or fields as FP98 calls them) get validated by my JavaScript functions. Once I kick out an alert message, I want to set focus to a vertain control. I can do it just fine with everything but Radio buttons, why? I know all the radio buttons in a group have the same name, but surely I could atleast set focus to the first one?
for example this works:
function RoxValid1(theForm)
if (theForm.OtherForum!="ON")
{
alert("How about clicking the Other Check Box first?");
theForm.OtherForum.focus()
return (false);
}
return (true);
but this doesn't work:
function RoxValid2(theForm)
if (theForm.FavoritePart!="Other")
{
alert("How about clicking the Other Radio Button first?");
theForm.FavoritePart.focus()
return (false);
}
return (true);
and I've tried theForm.FavoritePart.click() too. Both ways throws a error telling me that theForm.FavoritePart object doesnt support this property or method. Is there anyway around this with radio buttons?
(Dear John Harvey... it only took a few weeks, but yes I'm writing java script & have officially crossed over to the darkside! < duck > =D) )
Roxanne M. Seibert
Independent Consultant, VFP MCP
Code Monkey Like Fritos