netscape 4, modify html

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bulk88@hotmail.com

    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.

  • Hywel Jenkins

    #2
    Re: netscape 4, modify html

    In article <1104733596.337 443.123870@f14g 2000cwb.googleg roups.com>,
    bulk88@hotmail. com says...[color=blue]
    > 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.[/color]

    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.

    Comment

    • Martin Honnen

      #3
      Re: netscape 4, modify html



      bulk88@hotmail. com wrote:
      [color=blue]
      > 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.[/color]

      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.layer s && (layer = document.layers .embedLayer)) {
      layer.visibilit y = '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

      Comment

      • bulk88@hotmail.com

        #4
        Re: netscape 4, modify html

        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 .

        Comment

        • bulk88@hotmail.com

          #5
          Re: netscape 4, modify html

          Correction, hiding it in mozilla doesnt make it quiet.
          bul...@hotmail. com wrote:[color=blue]
          > Hiding a Windows Media Player instance doesnt make it quiet (except[/color]
          in[color=blue]
          > Mozilla), I guess I'll just have to do browser detection and hard[/color]
          code[color=blue]
          > for WMP and use LiveConnect .[/color]

          Comment

          • Martin Honnen

            #6
            Re: netscape 4, modify html



            bulk88@hotmail. com wrote:
            [color=blue]
            > Hiding a Windows Media Player instance doesnt make it quiet (except in
            > Mozilla)[/color]

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

            <html lang="en">
            <head>
            <title>rewritin g a layer in NN 4</title>
            <script type="text/javascript">
            function clearLayer (layerId) {
            var layer;
            if (document.layer s && (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="clearL ayer('embedLaye r'); return false;">clear</a>
            </p>
            </body>
            </html>



            --

            Martin Honnen

            Comment

            Working...