Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 19-08-2009
Member
 
Join Date: Aug 2008
Posts: 90
Unable to scroll top page design in Javascript

Does anybody know how to get document.body.scrollTop to fail? I'm working with a simple popup function that needs the scroll value to determine where to locate the popup. I have also notice when I drag my mouse over "some" controls, I have to move the curser off screen and wait for the page to loaded, then it again work as normal, and also sometime Whenever I drag the page down to the bottom it continues to scroll.
Reply With Quote
  #2  
Old 19-08-2009
Member
 
Join Date: Jan 2009
Posts: 143
Re: Unable to scroll top page design in Javascript

There are some constants available that give the document area of the window that is available for writing to. You have to call function goto_top() to use this script. Let's take a look on working of the script. Here two variables goto_top_type(-1) and goto_top_itv(0) are defined which help in controlling the scrolling effect.These will not be available until after the document has loaded and the method used for referencing them is browser specific.
Reply With Quote
  #3  
Old 19-08-2009
Member
 
Join Date: Dec 2008
Posts: 161
Re: Unable to scroll top page design in Javascript

I suspect this can be fixed by moving the hidden "ScrollTop" <input> to the top of the page instead of the bottom. Internet Explorer is the one that cannot make up its mind, and its influence means that other browsers change their clientHeight behaviour in different versions in order to match it. The document object represents both the content viewed in the browser window or frame and the other content of the HTML file loaded into the window or frame.For now, almost all browsers provide window.innerHeight/Width so that can be used. Internet Explorer has chosen to swap the values around when it is in strict mode.
Reply With Quote
  #4  
Old 19-08-2009
Member
 
Join Date: Jan 2009
Posts: 140
Re: Unable to scroll top page design in Javascript

There can be only one body element in an HTML page, so both the IE and W3C DOMs provide a shortcut reference to the object, document.body. I did a pretty massive simplification since I only wanted a simple box and the code called for graphic ballons. document.body.scrollTop Provide the distance in pixels between the actual top edge of the element's physical content and the top edge of the visible portion of the content. When the content is not scrolled, scrollTop values is set to zero.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Unable to scroll top page design in Javascript"
Thread Thread Starter Forum Replies Last Post
Why does firefox scroll through images when im trying to scroll the page??? shenny88 Technology & Internet 3 25-11-2010 08:18 AM
iMac Mouse wheel doesn't scroll a page up Anish-Mumbai Portable Devices 5 24-07-2010 12:42 PM
What are the basic principles for page layout in web design? Christina 80 Software Development 4 05-03-2010 03:27 AM
How to design javascript parent iframe Nurhan Software Development 3 13-08-2009 03:26 PM
Code to scroll to javascript element. sizzla Software Development 2 04-07-2009 10:13 PM


All times are GMT +5.5. The time now is 08:39 PM.