PDA

View Full Version : Dynamic Ajax Content: Can I make it scroll?



hb_cmcl
02-25-2008, 06:34 PM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem:
Not a problem so much as a hope that someone can help me modify this. I'm using this script to call a dynamically-generated PHP page (say, mypage.php) into a DIV on my main page (index.php), and I have added a setInterval at the top of the script so it will refresh the DIV every thirty seconds or so. (Mypage.php is pulling info from a MySQL database that gets updated somewhat regularly, so this is just a way to display the most up-to-date information in the database.) Works great, but I need to somehow get it refreshing and scrolling, preferably like jscheuer1's wonderful seamless vertically-scrolling text seen here:
http://home.comcast.net/~jscheuer1/side/files/vertical_slide.htm

I don't need the slower/faster/start/stop doodads, though the ability to pause the scrolling on mouseover would be nice.

I know it's frowned upon here to ask how to combine two completely separate scripts, but is there an alternative way to make the contents of the div scroll?

In trying to combine the two, I've tried just simply putting the scrolling script into mypage.php, the refresh script on index.php, and then calling mypage.php into the DIV on index.php, but it doesn't scroll when I do so. (It does refresh like it's supposed to, though.) I've also tried the reverse: putting the scrolling script on index.php, the refresh script on mypage.php, and calling mypage.php into the DIV on index.php, but no luck there either.

Bearing in mind that I'm still really new to Ajax and kind of flying blind here, can anyone steer me towards what I'm trying to do?