Page 1 of 1

Smooth pagination using PHP,MYSQL<AJAX

Posted: Mon Mar 19, 2007 2:12 am
by aniltc
hi all

I have a ribbon image (ribbon image means-around 6 small images in a row with previous Button in the beginning and Next button in the end) .What i want to do when i am clicking on a next button I want to display next 6 images with the running effect.Running effect means user should feel all images are going to front without reload the page(using AJAX) and same thing will happen for Previous (when some one clicking on the previous link i need to show previous 6 images with running effect using AJAX.

I hope everyone understood my situation here.


Please help me

Thanks to all

Posted: Mon Mar 19, 2007 2:35 am
by jmut
what have you tried till now to achieve this.
could you describe the process in pseudo code.

Posted: Mon Mar 19, 2007 2:41 am
by aniltc
hi

I just tried to display the images in a row .now i am trying to do previous and next button links.That part is ok.But
i have no idea how to give the ajax based effects when some one clicks on the links.this is where i got stuck


please help me

Thanks

Posted: Mon Mar 19, 2007 6:47 am
by thiscatis
Have a look at Prototype

You could use something like

Code: Select all

<script language="Javascript">
function Request(page)
{
	var d = new Date();
	var time = d.getTime();
    $('inhoud').innerHTML = '<div id=loading>Loading images, please stand by...</div>';
    new Ajax.Updater('images',page+'?&time='+time,{asynchronous:true, method: 'get'});
}
</script>
With a div id=images with get data to retrieve the correct images.
You'll have to include the prototype.js file too

//edit, what's the bbcode to display javascript with all its fancy colors?

Posted: Tue Mar 20, 2007 3:21 am
by aniltc
Thanks

can i use prototype for ajax effects.I am able to do the ajax fuctions without using prototype library.What i am looking for when a user clicks on next button or next link the user should feel all images are going back and gettiing next messages


Is this possible with prototpe?

please help me

Thanks to all

Posted: Tue Mar 20, 2007 6:11 am
by onion2k
You can build dhmtl effects with prototype.js, sure. If you don't fancy coding your own then script.aculo.us is an effects (and more) library built on top of Prototype.js. Alternatively to that there's JQuery, which is another Ajax library that does include effects by default, though fewer than script.aculo.us.

I've used all three, and built an application with script.aculo.us and Prototype.js. If I was just starting out though I think I'd use JQuery. It's lovely, and very lightweight.

Posted: Tue Apr 10, 2007 1:01 am
by aniltc
Thanks