PHP and JavaScript Interaction: Storing Data in the Client, part 3

In the final article in our series about using PHP and JavaScript to store data on the client side, we will be building on what we learned about server and client interaction to create a JavaScript-based paginating system.

While the subject is far too extensive for being completely treated in a couple of articles, from my point of view, [I've] tried to contribute a bit by explaining a simple approach for storing server-side data in JavaScript arrays.

Following this technique, [I've] developed a "createJavaScript()" PHP function, which is fed with server-side data (files or result sets), and returns a JavaScript array populated with these contents. For a full review of this function, please return to part one of this series. While this function is not going to blow your mind away, it has proven to be handy in the development of certain applications that may be suitable for small web projects.

In the second part, we added another toy to our developer's toolbox by creating a file-based news ticker, simply by manipulating JavaScript arrays. Maybe you're wondering…so what? There are hundreds of those tiny applications out there, ready for copy-and-paste action! Fine, despite the important concept of code reusability, nothing stops us from using PHP and JavaScript to create our own programs.

Considering this, our next and final step will be using this server-client programming interaction to build a JavaScript-based paging system. I mean 1, 2, 3, …and so forth. Is such a thing possible? Yes, it is. Let's put our hands to the hard work and start learning more.

Chris Charlton

Chris CharltonChris, Los Angeles' CSS & ActionScript guru, successfully cannonballed into web development in the late 90's. Always caught up with the latest in Flash, Dreamweaver, Fireworks, and XML, Chris authored premium articles for the largest Dreamweaver/Flash community (www.DMXzone.com) and produced WebDevDesign (iTunes featured), a popular Web Design & Development Podcast. Somewhere, Chris finds time to run an authorized Adobe user group focused around open source and Adobe technologies. Being a big community leader, Chris Charlton remains a resident faculty member of the Rich Media Insitute and lends himself to speak at large industry events, like JobStock, NAB, and FITC Hollywood.

Brain cycles from Chris are always Web Standards, Flash Platform, and accessibility.

See All Postings From Chris Charlton >>

Comments

Be the first to write a comment

You must me logged in to write a comment.