NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Javascript - Scroll Div Content

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-29-2006, 04:04 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Jan 2005
Location: Liverpool, UK
Posts: 159
Harro is on a distinguished road
 



Solved: Javascript - Scroll Div Content


I have been trying to get the content of a div to scroll by use of a link. Here is the closest I have got so far.
????: NamePros.com http://www.namepros.com/programming/212011-javascript-scroll-div-content.html

HTML Code:
<script language='javascript'>
  function move_up() {
	content.scrollTop += 10;
  }
  
  function move_down() {
    content.scrollTop -= 10;
  }
 </script>
(content is the div id)

...and calling the function from the link, this works in IE however it does not in FF. Anyone body know how to get this working in FF, or know of anyother ways to do this.

Thanks for any help you can give.
Harro
Last edited by Harro; 06-30-2006 at 01:14 AM. Reason: Solved
Harro is offline  
Old 06-29-2006, 05:02 PM   #2 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
If content is the ID, you should be doing document.getElementById('content').scrollTop
Dan is offline  
Old 06-30-2006, 01:14 AM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Jan 2005
Location: Liverpool, UK
Posts: 159
Harro is on a distinguished road
 



What would I do without you, thanks again.
Harro.
Harro is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:17 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger