evaluating a property of parent is hiden....

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top