Convert for netscape?

J

Jason

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

_________________________________ ______________________________________


<!--

var footerDistFromTop

footerDistFromTop = document.all.content.clientHeight+90;

document.all.footer.style.top = footerDistFromTop;

var domain = "hotmail.com"
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.html>Listen</a>] [<a
href=bio.html>Bio</a>] [<a href=contact.html>Contact</a>]<br>")
document.write('Text, code and images cant be used without asking ')
document.write(address.link(openmail))
document.close()




//-->
 
D

DU

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

_________________________________ ______________________________________


<!--

var footerDistFromTop

footerDistFromTop = document.all.content.clientHeight+90;

document.all.footer.style.top = footerDistFromTop;

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.getElementById("footer").style.top =
document.getElementById("content").clientHeight + 90 + "px";

.... otherwise provide the url of the webpage.
var domain = "hotmail.com"
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.html>Listen</a>] [<a
href=bio.html>Bio</a>] [<a href=contact.html>Contact</a>]<br>")

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.html'>Home<\/a>] [<a href='file.html'>File
<\/a>] [<a href='view.html'>View<\/a>] [<a
href='listen.html'>Listen<\/a>] [<a
document.write('Text, code and images cant be used without asking ')
document.write(address.link(openmail))
document.close()

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,091
Messages
2,570,604
Members
47,223
Latest member
smithjens316

Latest Threads

Top