PDA

View Full Version : Help with DD Script



Shera
04-28-2005, 04:05 PM
I have the Top Navigation Bar script on my site from this link here http://www.dynamicdrive.com/dynamicindex1/index.html It is the 1st one. Now it is supposed to stay at the top of my page so you can see it as you scroll down but it doesn't scroll down with me. I have looked and looked but it just stays at the top and out of view as you are scrolling. Can any of you help me figure out why it might be doing that. The site it is on is here. http://sheras-letters/stuff.com/ Just click on my logo and it will take you to the page with it there. Any help is well appreciated. This is my first post so I hope I did this right.

Thank you,
Shera

jscheuer1
04-29-2005, 07:07 PM
Every time I try to go to your page to check this out I get a 'page cannot be displayed'. If I try to go to the root URL, stuff.com, I get some search page somewhere telling me that the domain name is available to be purchased. How about giving us the real link to your page so we can figure out the problem?

cr3ative
04-30-2005, 07:44 AM
Is this your page:

http://sheras-letters-n-stuff.com/ ?

cr3

jscheuer1
04-30-2005, 04:54 PM
Thanks Cr3, I'll assume that it is, if so, here is the solution:

With that doctype:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">the UpdateIt script must be rewritten as 'document.body' no longer works as expected. This UpdateIt script now works in IE with or without that doctype and possibly with other doctypes but, I can't say as much for the rest of the menu. Here is the new UpdateIt script:


<script type="text/javascript">
function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}
function UpdateIt(){
if (ie&&keepstatic&&!opr6)
document.all["MainTable"].style.top = iecompattest().scrollTop+"px";
setTimeout("UpdateIt()", 200);
}
UpdateIt();
</script>Use it to replace this:


<script language="JavaScript">
function UpdateIt(){
if (ie&&keepstatic&&!opr6)
document.all["MainTable"].style.top = document.body.scrollTop;
setTimeout("UpdateIt()", 200);
}
UpdateIt();
</script>and all will be right with the world. :D