Solved

Display property error

Posted on 2006-06-21
6
734 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
  • 4
6 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 500 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
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

777 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