codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Scroll image but stop before it reaches the top  noone at 19:04 on Monday, June 06, 2005
 

Im not even sure if this is JS or DHTML but here goes.

I have an div containg three images that I need to scroll with the user as they scroll down the page. However I need the div to stop before it gets withing a certain distance from the top and bottom of the page. Is this possible? How should I go about it.

  Re: Scroll image but stop before it reaches the top  Troy Wolf at 19:28 on Monday, June 06, 2005
 

It is DHTML which means "manipulating HTML with Javascript". So it is both DHTML and javascript, but that's redundant. :)

Do you already know how to scroll an element, and now you just need to know how to know if you are within a specific distance from the top or bottom? Or do you need help with the whole thing?

Here is one article that deals with scrolling content.
http://www.snook.ca/archives/000368.html

More detailed help here:
http://javascriptkit.com/javatutors/static4.shtml

Start with the smallest possible set of code and build on that. Test every step along the way to catch any mistakes immediately before going further.

Enjoy the journey.
Troy Wolf: site expert
SnippetEdit Website Editor









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  matrix addition
•  Re: Storing data from HTML to Excel or TXT
•  Re: function within loop problem
•  Re: Ô‡´ò¥¯¥é¥Ö¤Ï ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
•  Re: Replace
•  Re: タイトリスト AP2アイアン 712ã�®æƒ…å �
•  Re: SMS from Perl using HTTP request
•  Re: Charl Schwartzel
•  Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013