Document floater error

Results 1 to 2 of 2

Thread: Document floater error

  1. #1
    Join Date
    Dec 1969
    Posts
    5

    Default Document floater error

    I have some code that keeps the menu at the top even when the user scrolls down. I am getting the error (&#039;document.all.floater.style&#039; is null or not an object). Any ideas?<BR><BR><BR>&#060;script language="JavaScript"&#062;<BR>// Code to scroll menubar down when user scrolls in mainframe<BR>self.onError=null;<BR>currentX = currentY = 0; <BR>whichIt = null; <BR>lastScrollX = 0; lastScrollY = 0;<BR> <BR>NS = (document.layers) ? 1 : 0;<BR>IE = (document.all) ? 1: 0;<BR> <BR>&#060;!-- STALKER CODE --&#062;<BR>function scroll() {<BR> if (IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }<BR> if (NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }<BR> if (diffY != lastScrollY) {<BR> percent = .1 * (diffY - lastScrollY);<BR> if (percent &#062; 0) percent = Math.ceil(percent);<BR> else percent = Math.floor(percent);<BR> if (IE) document.all.floater.style.pixelTop += percent;<BR> if (NS) document.floater.top += percent; <BR> lastScrollY = lastScrollY + percent;<BR> }<BR> if (diffX != lastScrollX) {<BR> percent = .1 * (diffX - lastScrollX);<BR> if (percent &#062; 0) percent = Math.ceil(percent);<BR> else percent = Math.floor(percent);<BR> if (IE) document.all.floater.style.pixelLeft += percent;<BR> if (NS) document.floater.left += percent;<BR> lastScrollX = lastScrollX + percent;<BR> } <BR>}<BR>&#060;!-- STALKER CODE --&#062;<BR><BR>function go() { <BR> if (NS &#124&#124 IE) action = window.setInterval("scroll()",10); <BR>}<BR>&#060;/script&#062;

  2. #2
    Join Date
    Dec 1969
    Posts
    312

    Default RE: Document floater error

    I can&#039;t see your floater in there anywhere - the actual element itself - but does it have a preassigned style when it is created? Do you feed it default x and y positions?

Posting Permissions

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