Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Netscape Communicator
Expertise: Beginner
Jan 28, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Netscape DIV Tags

How do I make the contents of one DIV (divA) equal to the contents of another DIV (divB) in Netscape? I know that in Microsoft Internet Explorer the code would be
divA.innerHTML = divB.innerHTML
Thanks for your help.

Unfortunately, there is no way to do what you want here. The Netscape 4.x DIV tags are considerably more primitive in their structure than the DIV tags used in Microsoft Internet Explorer, and even the LAYER tag doesn't have the necessary interface to let you read the contents of an individual element. The closest solution that you can manage would be to write to both of the layers from the same source:

var myMessage="This is a test."
You should also note that Netscape does not have a translation mechanism for writing straight text to a layer--you can only write HTML. While this feature limitation is usually not a major factor, it can be important if you use escaped characters. If the text to be passed was a programming statement such as:
if (a
then Netscape will attempt to create a new tag called "". Since there is no closing bracket, the HTML parser will continue looking until it finds one (likely the closing bracket of the  tag). This is guaranteed to give you something you didn't expect.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date