473,320 Members | 2,180 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,320 software developers and data experts.

netscape 4, modify html

I know Netscape 4 is Ancient and horrible but I need to make my site
Netscape 4.8 compatible. But how can I rewrite HTML code/do minor DTHML
on my site with Netscape 4/4.8, document.write works, but I cant remove
anything with it. Mostly what I need to do is remove/disable a embed or
object tag if a user clicks a button, and write it back in if they
click another. IE 4's DOM is so so so so much better and so much more
Dom Level 1.

Jul 23 '05 #1
5 1711
In article <11**********************@f14g2000cwb.googlegroups .com>,
bu****@hotmail.com says...
I know Netscape 4 is Ancient and horrible but I need to make my site
Netscape 4.8 compatible. But how can I rewrite HTML code/do minor DTHML
on my site with Netscape 4/4.8, document.write works, but I cant remove
anything with it. Mostly what I need to do is remove/disable a embed or
object tag if a user clicks a button, and write it back in if they
click another. IE 4's DOM is so so so so much better and so much more
Dom Level 1.


What about hiding stuff in <layer></layer> and toggle its visibility
using the document.layers collection?

--
Hywel http://kibo.org.uk/
I do not eat quiche.
Jul 23 '05 #2


bu****@hotmail.com wrote:
I know Netscape 4 is Ancient and horrible but I need to make my site
Netscape 4.8 compatible. But how can I rewrite HTML code/do minor DTHML
on my site with Netscape 4/4.8, document.write works, but I cant remove
anything with it. Mostly what I need to do is remove/disable a embed or
object tag if a user clicks a button, and write it back in if they
click another.


Frankly if you do not have a clue about NN 4 and are building a web site
now then make it NN 4 compatible by serving static HTML to NN 4 with
script for DOM browsers with appropriate checks so that NN 4 users do
not get script errors.
That way the site works for NN 4 users, even if dynamic effects are not
there.

The only thing that Netscape 4 can do dynamically besides scripting
forms is the manipulation of the visibility, clipping, background, and
complete content of what it sees as layers.
Thus if you have CSS

<style type="text/css">
#embedLayer {
position: relative;
}
</style>

and HTML

<div id="embedLayer">...</div>

then in NN 4 you can hide that div using

var layer;
if (document.layers && (layer = document.layers.embedLayer)) {
layer.visibility = 'hide';
}

But the div is only hidden then, no reflow happens (as would in modern
browsers if you scripted the CSS display property) so whatever layout
space the div had is now simply an empty block.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #3
Hiding a Windows Media Player instance doesnt make it quiet (except in
Mozilla), I guess I'll just have to do browser detection and hard code
for WMP and use LiveConnect .

Jul 23 '05 #4
Correction, hiding it in mozilla doesnt make it quiet.
bul...@hotmail.com wrote:
Hiding a Windows Media Player instance doesnt make it quiet (except in Mozilla), I guess I'll just have to do browser detection and hard code for WMP and use LiveConnect .


Jul 23 '05 #5


bu****@hotmail.com wrote:
Hiding a Windows Media Player instance doesnt make it quiet (except in
Mozilla)


You can clear the complete content of a layer in NN 4 as follows:

<html lang="en">
<head>
<title>rewriting a layer in NN 4</title>
<script type="text/javascript">
function clearLayer (layerId) {
var layer;
if (document.layers && (layer = document.layers[layerId])) {
layer.document.open();
layer.document.write('');
layer.document.close();
}
}
</script>
<style type="text/css">
#embedLayer {
position: relative;
}
</style>
</head>
<body>
<div id="embedLayer">
<p>Kibology for all.</p>
</div>
<p>
<a href="#"
onclick="clearLayer('embedLayer'); return false;">clear</a>
</p>
</body>
</html>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #6

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

Similar topics

6
by: Ingmund Sjåstad | last post by:
Trying to make a dropdown menu. I working nice in IE6 but when I try a link in Netscape 7 nothing happens. Can anybody help me? <html> <head> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
6
by: Telemak | last post by:
Hello, I've got a trouble with my script, i want to show a <div> on Netscape and it doesn't work: Here is the script //navigators identification
2
by: lmeng | last post by:
Hi, I am new to this Forum. Thanks in advance for any kind help. In the following HTML code, when I change the value of one text field then click "Modify" button, if the validation fails a...
2
by: Norman Swartz | last post by:
OS system is Windows XP Pro SP2. The following works perfectly in IE but not at all in Netscape: <tr> <td valign="middle" background="dull.gif" onMouseOver="this.background='bright.gif';"...
5
by: zaw | last post by:
Hi I am working on implementing this script to shopping cart. Basically, it copies fill the shipping address from billing automatically. I believe one or more syntax is not netscape compatible....
7
by: David Laub | last post by:
I have stumbled across various Netscape issues, none of which appear to be solvable by tweaking the clientTarget or targetSchema properties. At this point, I'm not even interested in "solving"...
6
by: qqq | last post by:
I'm a relative newbie... I'd like my site to support Netscape browsers. For a page I set 'TargetSchema' to 'IE 3.02/Netscape 3'. When I insert label or textbox web controls on the page, they...
4
by: Neal | last post by:
Hi All I developed a site in ASP.Net 2003, which is great in IE 5.5 + but a lot of our users at the University use Netscape and it just don't work in Netscape. Hyperlinks (webform) align...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.