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

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.

  1. PHP and JavaScript Interaction: Storing Data in the Client, part 3
  2. Records wanted! Fetching data from tables
  3. Defining data containers: the "createDivs()" function
  4. Showing database records: the "displayRecords()" function
  5. 1 - 2 - 3 Next
  6. Building paging links: the sequel
  7. Building client-based result sets: making PHP and JavaScript interact
By: Alejandro Gervasio
Rating: starstarstarstarstar / 14
May 18, 2005

print this article




Welcome to the final part of the series "PHP and JavaScript Interaction: Storing Data in the Client." Definitely, it's been a highly satisfactory experience to deeply explore the possibilities of the PHP-JavaScript interaction process, which offers a wide range of possible applications in Web projects.

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 <previous> 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.

>>> More PHP Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: