/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Not working in IE

Can anyone tell me why this isn’t working in IE.

function cmdHide(x){
var a = “Row” + x
var b = “Image” + x

to post a comment

4 Comments(s)

Copy linkTweet thisAlerts:
@mrhooApr 23.2007 — document.getElementById(a).style.display="table-row"

one of IE's stumbles is css display properties.

you are pretty much stuck with none, block, inline and inherit.

You should be able to set an element.style.display='' to remove the 'none' and use whatever the browser has for a default table display.

Just don't override the default with tr{display:none} in a style sheet.
Copy linkTweet thisAlerts:
@vijirubaApr 23.2007 — [CODE]
Copy linkTweet thisAlerts:
@rootApr 23.2007 — Also, it would be more tidy if you only requested the document element once...

function cmdHide(x){

var a = "Row" + x;

var b = "Image" + x;







// do something else...



is allot easier to read, you grab all the data you need in one object variable and then access the properties far quicker as your not having the function search the document nodes which people dont understand that in a simple form can be as many as 140 objects... so looking on a document.body could be thousands of nodes to search, speed up things by creating an object reference to the item directly or use direct references to the document element you want to grab or make a change in.
Copy linkTweet thisAlerts:
@nbcrockettauthorApr 23.2007 — Thanks guys, I was able to get it working.


Help @nbcrockett 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 2.22,
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: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,

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