LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[Webdev] Netscape Javascript console

[Webdev] Netscape Javascript console

Niall O Broin niall at linux.ie
Tue May 15 12:12:12 IST 2001


Hi,
   I am trying to debug some thorny Javascript and I thought I could use
Netscape's Javascript console to help me. I'm trying to manage a document
with layers and a form, and the exact relationship of form to layers is
driving me nuts. Anyway, T don't seem to be ab;t to use the console to do
anything worthwhile. When I use the typein box to call a function like

hideLayer("somelayer")

I get an error message like


JavaScript Error: [unknown origin]:

hideLayer is not defined.


and when I do


document.layers["somelayer"].visibility="hidden";

I get


JavaScript Error: [unknown origin]:

document.layers.collection_0 has no properties.


Needless to say, hideLayer is a function, and hideLayer("somelayer") actully
does

document.layers["somelayer"].visibility="hidden";

and this works on the page, when called as part of the page processing, but
I can't make it work from the console.


The thought occurs to me as I write that perhaps the problem is that the
console is at a higher level than my document. This is reinforced by the
fact that when I simply type in a variable name at the typein I get

variable_name is not defined

So I guess the question becomes - how do I reach parts of a document from
the console ?




Regards,



Niall




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell