/    Sign up×
Community /Pin to ProfileBookmark

style.display = "none" script

Can someone explain why this is not working in IE and only in firefox. I believe it to be because of the if statement.

[code=php]function find(fi){

var table = document.getElementById(“incidenttable”);
var arr = table.getElementsByTagName(“tr”);
for (i = 0; i < arr.length; i++) {
status = arr[i].getAttribute(“class”);
arr[i].style.display = arr[i].style.display = “”;
if(status !== fi && status !== “rower”) {

arr[i].style.display = arr[i].style.display = “none”;
}
}
}

</script>
<h1 align=center>Incident Report Matrix – Online</h1>
<div align=”center”><table align=”center” id=”incident” width=”40%”>
<tr>
<td><input type=”button” onClick=”find(‘Application’)” value=”Application” /></td>
<td><input type=”button” onClick=”find(‘System’)” value=”System” /></td>
<td><input type=”button” onClick=”find(‘Network’)” value=”Network” /></td>
<td><input type=”button” onClick=”find(‘Store’)” value=”Store” /></td>
<td><input type=”button” onClick=”find(‘Other’)” value=”Other” /></td>
</tr>
</table></div>
<table border=1 style=”text-align:center” cellspacing=0 id=”incidenttable” cellpadding=0 width=”100%”>
<tr style=”font-weight:bold;” class=”rower”>
<td>Number</td><td>Date</td><td>System</td><td>Desc</td><td>Reported by</td><td>Impact</td><td>Status</td><td>Reason</td>
</tr>
[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@ericatekkaauthorOct 26.2010 — Sorry this is meant for the javascript forum. I will recreate there. Please disregard this.
×

Success!

Help @ericatekka 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

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