Forum Moderators: open
<form name="one">
<input type="text" name="text1" size="20"><br>
<input type="text" name="text2" size="20"><br>
<input type="text" name="text3" size="20"><br>
<input type="text" name="text4" size="20"><br>
and next there is one icon, if i click that icon
the other 2 text fields are shown.
<input type="text" name="text5" size="20"><br>
<input type="text" name="text6" size="20"><br>
if i close that icon tis 2 text fields are hidden
<input type="Submit" onclick="callme()">
I am validating that all fields are should be integer only,
and any one contain non integer field the focus should be set for that field,
The problem is while i was setting the focus for the hidden field "Focus cannot be set for the filed as it is hidden'
Error coming How can i resolve this one.
If you have to check if they are valid, even when hidden. You could either make them visible before setting focus, or check if they are hidden and set no focus if they don't validate.