Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Display property error

Posted on 2006-06-21
6
Medium Priority
?
752 Views
Last Modified: 2007-12-19
Hi guys,

I'm working on adding a feature to hide rows of a table in one of my web applications, and get this error on page load:

Error: Could not get display property. Invalid argument.

this is my function:

function InspectorShowHide(displaySetting) {
      document.getElementById("insRowinspectorID").style.display = displaySetting;
      document.getElementById("insRowinspectorWidth").style.display = displaySetting;
      document.getElementById("insRowinspectorHeight").style.display = displaySetting;
      document.getElementById("insRowinspectorLatitude").style.display = displaySetting;
      document.getElementById("insRowinspectorLongitude").style.display = displaySetting;
      document.getElementById("insRowinspectorZIndex").style.display = displaySetting;
}

and it is being called on the:

<body onload="InsectorShowHide('hide');">

Any ideas how to get past this error?


Cheers!
0
Comment
Question by:Cyber-Drugs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 2000 total points
ID: 16953738
Hi Cyber-Drugs,

It is:

display:none
visibility:hidden

;-)

Regards,
Ted
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 16953748
I am really not with it today am I? Lol, thanks again Ted!
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16953752
Cyber-Drugs,

In fact, to toggle, you would do:

InspectorShowHide('none');

and

InspectorShowHide('');

assuming of course InspectorShowHide is spelled correctly.

Ted
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 36

Expert Comment

by:Zyloch
ID: 16953756
Cyber-Drugs,

No problem, it's just one of those days, eh?

Ted
0
 
LVL 18

Expert Comment

by:Morcalavin
ID: 16953758
Use 'none' instead of 'hide'
'block' will make the elements visible again,
'inline' will also make them visisble, but in a different manner.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16953777
Yep, exactly, and there are other ones too, such as inline-block and table, for instance. Setting it to blank will revert the object to its default display setting, be it block, inline, or table, etc.

Ted
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question