473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Retrieve an array of tags in Communicator (NS4)?

For IE, I can retrieve an array of tags using:

document.all.tags("tagname")

For NS6 & 7 I can use:

document.getElementsByTagName("tagname")

Is there an equivalent for that ancient NS Communicator 4?
Jul 23 '05 #1
2 1288
MyndPhlyp wrote:
For IE, I can retrieve an array of tags using:

document.all.tags("tagname")

For NS6 & 7 I can use:

document.getElementsByTagName("tagname")

Is there an equivalent for that ancient NS Communicator 4?


No. However, setting the position CSS style explicitly adds
pretty much every tag to the document.layers[] collection. It's
sort of useless though, since you can't directly access or
manipulate the text in that tag.

<body onload="test();">
<b style="position:relative;">Test</b>
<b style="position:relative;">Another Test</b>
<script type="text/javascript">
function test() {
alert(document.layers[0].clip.width + ';' +
document.layers[1].clip.width);
}
</script>
</body>

In Netscape 4.78, you see "30;88", which seems to indicate you
are obtaining the width of the first and second <b>.

You can also access the CSS style of any type of tag using
document.tags.{tagName}, for example
document.tags.H1.color="blue"; Unfortunately, this will not
change the style dynamically, it's only useful at load time (ie -
in the <head></head> before any content actually loads).

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2

"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:41***************@agricoreunited.com...
MyndPhlyp wrote:
For IE, I can retrieve an array of tags using:

document.all.tags("tagname")

For NS6 & 7 I can use:

document.getElementsByTagName("tagname")

Is there an equivalent for that ancient NS Communicator 4?


No. However, setting the position CSS style explicitly adds
pretty much every tag to the document.layers[] collection. It's
sort of useless though, since you can't directly access or
manipulate the text in that tag.

<body onload="test();">
<b style="position:relative;">Test</b>
<b style="position:relative;">Another Test</b>
<script type="text/javascript">
function test() {
alert(document.layers[0].clip.width + ';' +
document.layers[1].clip.width);
}
</script>
</body>

In Netscape 4.78, you see "30;88", which seems to indicate you
are obtaining the width of the first and second <b>.

You can also access the CSS style of any type of tag using
document.tags.{tagName}, for example
document.tags.H1.color="blue"; Unfortunately, this will not
change the style dynamically, it's only useful at load time (ie -
in the <head></head> before any content actually loads).

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq


Right after hitting the Send I noticed I had "stupidity" mode still enabled.
Not nearly enough coffee. I shortly realized that what I wanted just doesn't
exist in Communicator no matter what I try. Some day I'll actually start
remembering all those things that can't be done with that old hack.

What I am going after is the <link> tags in the <head> section. The intent
was to use the <link> tags to act as a source for a sidebar menu written in
client-side JavaScript. Yes, there are browser add-ons that provide the same
functionality however they tend also to be cluttered with other junk and I
was after a specific look and feel. All I needed was to get read access to
the information in the <link> tags, snatch the "rel", "href" and "title"
values, maybe respect the "media" and "type" values to weed out stylesheets
and bookmarks, and spew out a series of <a>'s to build the menu on-the-fly.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Info 3000 | last post by:
Hi there, Simple question, but headache ! I have a PHP Page like : <HTML> <HEAD> <TITLE>Sunny day !</TITLE> </HEAD>
3
by: Henning Heil | last post by:
hello all! I have a little problem with a DHTML feature which works fine with most browsers but not with NS4. an example can be found here:...
1
by: JuLiE Dxer | last post by:
I'm trying to programmatically retrieve various ID3 tags from WMA files. I'm mostly concerned with Artist and Title tags but would like to know how to retrieve any of the normal tags. I've seen...
4
by: FayeC | last post by:
I am building a table with style samples from 3 CSS files. We currently have 3 CSSs (NS4, IE and SUN) as our audience is diverse (banking industry - old systems and old browsers for about 50% of...
0
by: Thom Anderson | last post by:
I have seen web sites (mostly sharepoint portals) that integrate with MS Office Communicator. Our company uses Communicator and I'd like to integrate some of the communicator features with our...
1
by: centur | last post by:
Hello. I created simple asp.net application to search message history over Office Live Communicator conversations. I complete quite all job but stick with one thing - I have autosuggest box...
4
by: kevincw01 | last post by:
Anyone have a clever way to retrieve for example, items 0-29 from an array of size N>29, in random order? The catch is that I dont want to print any items more than once and I dont want to miss...
0
by: mrsamii | last post by:
Hi all, Sorry about posting the problem again. But I thought that if I explain a little bit more clear, it would help to find out a solution. I am working on a client side web application of...
0
by: hardikpatelmca | last post by:
Hi All, I am working on web application which communicate with Communicator Web Access and Live communication Server. I can successfully logged into LCS system using my web application. And also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.