I am using a javascript function to show some hidden elements on a page. Following is the piece of javascript code.
var itemArray = document.getElementsByName('hiddenItem');
for(i=0;i<itemArray.length;i++){
itemArray.className='pageSummary_cell';
}
The hiddenItem have a class where their display is set to none. When I set the className to pageSummary_cell, the items are displayed in firefox but not in IE. can anybody suggest a solution to it?
Thanks in advance
gauravHave a look at this
function hideSpans() {
var Spans = document.getElementsByTagName('span');
for(var i=0; i < Spans.length; i++) {
if(Spans.className=='someClass') {
Spans.className='pageSummary_cell';
}}}
Of course you can change the tag name to whatever you need it to be.
var itemArray = document.getElementsByName('hiddenItem');
for(i=0;i<itemArray.length;i++){
itemArray.className='pageSummary_cell';
}
The hiddenItem have a class where their display is set to none. When I set the className to pageSummary_cell, the items are displayed in firefox but not in IE. can anybody suggest a solution to it?
Thanks in advance
gauravHave a look at this
function hideSpans() {
var Spans = document.getElementsByTagName('span');
for(var i=0; i < Spans.length; i++) {
if(Spans.className=='someClass') {
Spans.className='pageSummary_cell';
}}}
Of course you can change the tag name to whatever you need it to be.