0

I try to find a scroller that is built in Ajax which makes it possible to scroll a part of a table/div (vertical).

Ex: You have two text areas; "A" and "B", when you press "down" it smoothly shows another text area ("C") and "A" disappears and "B" replace it, etc.

Dont know how to explain it better. Hope it makes some sense to someone.

Thanks...

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Graphix
0

You should make 2 functions:

- ShowObject(objectId) - CloseObject(objectId) And two global variables:

var maxHeight = 300;
var curHeight;

ShowObject(objectId) sets a Interval of for example every 20 miliseconds in which he calls itself again. Each time the function gets called it increases the height with 3px. If the maximum height has been reached (for example 300px) it stops the interval. CloseObject(objectId) does exactly the same as ShowObject(objectId) , but decreases the height at each function call until it reaches for example 10px.

To retrieve the object's height you should use the codeline curHeight = document.getElementById(objectId).height Good luck!

~G

Edited by Graphix: n/a

0

Thanks..

I was more about looking for a ready script since it's probably quite difficult to make for a PHP newbie like myself.

You don't happen to know where I could find such a script?

0

Well, first of all there is no AJAX nor PHP required to do this. Its all DHTML and JavaScript. If you are not able to write your own functions, you could consider using jQuery. Click the link below to go to a tutorial page on Show and Hide of a element.

http://www.learningjquery.com/2006/09/slicker-show-and-hide

Although you now have the functions to show and hide elements, you also want to have that only 2 elements of 3 appear at a time. Unfortunatly, that is way to specific to be able to find a already written script on the internet that matches your specific requirements. I think you need to create a function for that on your own ;)

~G

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.