Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Hide all fields begining with "Section 2 ...."

$
0
0

Hello all,

 

I'm currently working on a small script in order to select all field names begining with "section 2..."(so "section 2-1 Name", "Section 2-2 Address" etc...). I want to hide these fields using somthing similar to the following:

 

var x = [];

var inputs = document.getElementsByTagName("input");

for(var i = 0; i < inputs.length; i++) {

    var f= this.getField(this.getNthFieldName(i));

    if(f[i].name.indexOf("Section 2') == 0) {

        x.display = display.hidden;

 

    }

}

 

 

 

is there any way to hide all these fields through a fields begining with X type scenario? rather than having to name them all individually.


Viewing all articles
Browse latest Browse all 12130

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>