[thelist] Why is NS6 DHTML so SLOOOOOOOOOWWWWWWW?!

The Disintegrator disintegrator at sinectis.com.ar
Tue May 8 21:21:27 CDT 2001


There is any limitacion in the attributes I can change with this?
the quetion is because i cannot change the background color nor
background-image... why?

getStyle('mylayer').background-color: "red"
do nothing...


Edwin Martin wrote:

> Peter-Paul wrote:
>
> >Please don't forget that at the moment we cannot make commercial sites
> >that extensively use the W3C DOM because not enough browsers support it
> >(only 80%, which is too little). So we'll have to wait until the Version 4
> >browsers are out.
>
> With a little JavaScript, it's not hard to make DHTML which works in
> all DHTML-browsers.
>
> E.g. you have this layer:
>
> <style type="text/css">
> #mylayer {
>          position: absolute;
>          top: 300px;
>          left: 30px;
>          background-color: orange;
> }
> </style>
>
> <div id="mylayer">
> Text in a layer.
> </div>
>
> Just add this JavaScript function:
>
> <script language="JavaScript">
> function getStyle( layer ) {
>          if( document.getElementById ) {
>                  return document.getElementById( layer ).style
>          } else if( document.all ) {
>                  return document.all[layer].style
>          } else {
>                  return document[layer]
>          }
> }
> </script>
>
> And in JavaScript, you can change all kinds of properties:
> getStyle('mylayer').left = 120
> getStyle('mylayer').top = 100
> getStyle('mylayer').visibility='hidden'
> getStyle('mylayer').visibility='visible'
> getStyle('mylayer').zIndex = 2
>
> This works in Netscape Navigator 4 and higher and Internet Explorer 4 and
> higher!
>
> With a little JavaScript you can also make cross-browser clipping and
> content-changing. (And that's about it for cross-browser possibilities).
>
> And I never noticed Netscape 6 being slower than other browsers.
>
> There is no excuse not supporting the W3C standards!
>
> Bye,
> Edwin Martin.
>
> --
> Surf Edwin Martin's brainwaves: http://www.bitstorm.org/edwin/
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list