SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In updating my DHTML skills, I am learning how to implement a cross-browser document object model. The book I am using, though, was written a couple of years ago. the author shows how to sniff out a Netscape 4x, IE 4x, older, or newer browsers. The problem is that the author has assumed based on statements made at the time ofpublishing that the new 5x browsers are going to implement the same DOM standards. Is this true? Or should I also be checking on the new 5x and 6x version browsers?

    Thanks
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You should be checking... No browsers truly conform to the DOM yet. For a good tutorial on what your doing check the scriptorium at http://www.bratta.com/.
    Wayne Luke
    ------------


  3. #3
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's a good script for DOM, what y'all think of it?

    <script langauge="javascript" type"text/javascript">
    function changeLP(layerID,propertyName,itsValue){

    //arielladog@yahoo.com - http://www.javascriptcity.com/forums

    if(document.all){
    var start="document.all['";
    var mid="'].style.";
    }else if(document.layers){
    var start="document.layers['";
    var mid="'].";
    }else if(document.getElementByID){
    var start="document.getElementByID('";
    var mid="').style.";
    }
    if (isNaN(itsValue)){
    itsValue="'"+itsValue+"'";
    }
    eval(start+layerID+mid+propertyName+"="+itsValue);
    }
    </script>
    you list layerID to change, the property to change, then, the value of the new property. Eg:

    changeLP('layerID','left',100)

    Only thing is NN uses pixelLeft, but still works with left, anyways. ANd visibility is dif in NN and IE, but both work

    Adog

    [Edited by Arielladog on 08-31-2000 at 08:36 PM]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •