D
Disco
H,
I have the following code.......
<script language="JavaScript1.2">
<!--
// Places the focus in the first modifiable field on the page
function placeFocus() {
if (document.forms.length > 0) {
for (i = 0; i < document.forms[0].length; i++) {
if (document.forms[0].elements.type) {
thisType = document.forms[0].elements.type;
if ( (thisType == "text") ||
(thisType == "textarea") ||
(thisType == "password") ||
(thisType == "submit") ||
(thisType == "radio") ||
(thisType == "select") ||
(thisType == "reset") ||
(thisType == "fileupload") ||
(thisType == "checkbox") ||
(thisType == "button")) {
document.forms[0].elements.focus();
break;
}
}
}
}
}
// -->
</script>
i get a problem, when one of my pages contains the following as the first
found field.....
<div style="display:none;">
<SPAN class="field"><INPUT TYPE=TEXT NAME="TEXT_ITEM" VALUE="" size=12>
</SPAN></div>
(notice the 'div' that has the display:none).
is there a way in the javascript 'see' that this field is not displaying?
and therefore, try for the next field in the form?
Thanks
I have the following code.......
<script language="JavaScript1.2">
<!--
// Places the focus in the first modifiable field on the page
function placeFocus() {
if (document.forms.length > 0) {
for (i = 0; i < document.forms[0].length; i++) {
if (document.forms[0].elements.type) {
thisType = document.forms[0].elements.type;
if ( (thisType == "text") ||
(thisType == "textarea") ||
(thisType == "password") ||
(thisType == "submit") ||
(thisType == "radio") ||
(thisType == "select") ||
(thisType == "reset") ||
(thisType == "fileupload") ||
(thisType == "checkbox") ||
(thisType == "button")) {
document.forms[0].elements.focus();
break;
}
}
}
}
}
// -->
</script>
i get a problem, when one of my pages contains the following as the first
found field.....
<div style="display:none;">
<SPAN class="field"><INPUT TYPE=TEXT NAME="TEXT_ITEM" VALUE="" size=12>
</SPAN></div>
(notice the 'div' that has the display:none).
is there a way in the javascript 'see' that this field is not displaying?
and therefore, try for the next field in the form?
Thanks