Convert for netscape?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason

    Convert for netscape?


    Could anyone please give me a hand converting this script, written for
    IE to work with netscape?

    _______________ _______________ ___ _______________ _______________ ________


    <!--

    var footerDistFromT op

    footerDistFromT op = document.all.co ntent.clientHei ght+90;

    document.all.fo oter.style.top = footerDistFromT op;

    var domain = "hotmail.co m"
    var name = "kiznit"
    var address = name + "@" + domain
    var openmail = "mailto:" + address

    document.write( "[<a href=index.html >Home</a>] [<a href=file.html> File
    </a>] [<a href=view.html> View</a>] [<a href=listen.htm l>Listen</a>] [<a
    href=bio.html>B io</a>] [<a href=contact.ht ml>Contact</a>]<br>")
    document.write( 'Text, code and images cant be used without asking ')
    document.write( address.link(op enmail))
    document.close( )




    //-->
  • DU

    #2
    Re: Convert for netscape?

    Jason wrote:
    [color=blue]
    > Could anyone please give me a hand converting this script, written for
    > IE to work with netscape?
    >
    > _______________ _______________ ___ _______________ _______________ ________
    >
    >
    > <!--
    >
    > var footerDistFromT op
    >
    > footerDistFromT op = document.all.co ntent.clientHei ght+90;
    >
    > document.all.fo oter.style.top = footerDistFromT op;
    >[/color]

    You can get rid of the 3 above lines with this simple one which should
    work in all CSS1 compliant and DOM 1 compliant browsers:

    document.getEle mentById("foote r").style.to p =
    document.getEle mentById("conte nt").clientHeig ht + 90 + "px";

    .... otherwise provide the url of the webpage.
    [color=blue]
    > var domain = "hotmail.co m"
    > var name = "kiznit"
    > var address = name + "@" + domain
    > var openmail = "mailto:" + address
    >
    > document.write( "[<a href=index.html >Home</a>] [<a href=file.html> File
    > </a>] [<a href=view.html> View</a>] [<a href=listen.htm l>Listen</a>] [<a
    > href=bio.html>B io</a>] [<a href=contact.ht ml>Contact</a>]<br>")[/color]

    You need to escape the / in the constructed string; also, quoting the
    href values helps and appending a semi-colon for each instruction.

    document.write( "[<a href='index.htm l'>Home<\/a>] [<a href='file.html '>File
    <\/a>] [<a href='view.html '>View<\/a>] [<a
    href='listen.ht ml'>Listen<\/a>] [<a
    href='bio.html' >Bio<\/a>] [<a href='contact.h tml'>Contact<\/a>]<br>");

    [color=blue]
    > document.write( 'Text, code and images cant be used without asking ')
    > document.write( address.link(op enmail))
    > document.close( )
    >[/color]

    DU
    --
    Javascript and Browser bugs:

    - Resources, help and tips for Netscape 7.x users and Composer
    - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x


    Comment

    Working...