HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Do I have the script wrong?
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> Javascript
View previous topic :: View next topic  
Author Message
akomet



Joined: 15 Nov 2008
Posts: 2

Posted: Sat Nov 15, 2008 4:34 pm     Do I have the script wrong?  

Hi,
I'm new to this forum and hope someone can help. I
inserted the following code which I saw on someones website. On their page it produced a small rectangular box on the upper left of the page which read, "Don't Forget to Scroll Down for More Info!"
As the viewer scrolled down the page the little box followed down the page so it was always in view. I tried it on one of my pages and it looked exactly as it did on theirs but would not move down as I scrolled down. :(
So my question is-- does anyone know what I did wrong?
Thanks for any feedback,
akomet


<script>
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>

<layer id="divStayTopLeft">

<!--EDIT BELOW CODE TO YOUR OWN MENU-->
<table border="1" width="130" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="#FFFFCC">
<p align="center"><font face="Arial" size="1" color="#FF0000"><b>Don't
Forget to Scroll Down for More Info!</b></font></td>
</tr>
</table>
<!--END OF EDIT-->
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS

Posted: Sat Nov 15, 2008 8:42 pm      

You do not have enough content on page to genearte a scroll bar in browser. "layer" is not approved by w3c and may not work in all browsers.

You might like this one better: Floating Menu. Actually this is the same script that you copied, but you didn't get it all or placed it incorrectly.
akomet



Joined: 15 Nov 2008
Posts: 2

Posted: Sun Nov 16, 2008 10:38 am      

Thank you Ron,
I figured I did not have the entire code. Your link helped and I was able to solve my problem.
akomet
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS

Posted: Sun Nov 16, 2008 1:05 pm      

You're welcome. I like the script except for the use of the "layer" tag. I modified mine to get rid of all the table tags and to allow a little more styling. Plus, it validates except for the "layer" tag now. Will work on that when I get time.
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> Javascript
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group