/    Sign up×
Community /Pin to ProfileBookmark

works in ie but not netscape

Hi everyone,

My code works in IE but for some reason doesn’t work in Netscape. I’ve been trying for quite a while and for some reason just can’t get it to work. I’ve copied the code below, I would be so very grateful if someone could let me know what I need to change to get it to work with Netscape 7.1.

Netscape javascript console gives an error- var sel = rows[i].cells[selColNo].children[0]; has no properties.

Thanks!

function fillAllSel(selAllIndex, selColNo) {
if (selAllIndex > 0) {
selAllIndex = selAllIndex – 1;

var theTable = document.getElementById(‘dataTable’);

var rows = theTable.tBodies[0].rows;
for (i = 0; i < rows.length; i++)
{
if (rows[i].cells[selColNo])
{
var sel = rows[i].cells[selColNo].children[0];
if ((typeof(sel) != “undefined”) && (sel.tagName == “SELECT”))
{
sel.selectedIndex = selAllIndex;
sel.fireEvent(“onchange”);
}
}
}

// return the fill all to blank
var selAll = document.getElementById(‘fillAllSelector’);
selAll.selectedIndex = 0;

setChanged(‘1’, ‘2’);
}
}

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@PhillMcApr 20.2004 — Hey guys, we let him know that 'children' was IE Proprietary and suggested he repost/move here as you guys could answer his question better than I ever could ?
×

Success!

Help @sk3302003 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...