PHP
  Home arrow PHP arrow PHP and JavaScript Interaction: Storin...
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

PHP and JavaScript Interaction: Storing Data in the Client, part 3
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2005-05-18

    Table of Contents:
  • PHP and JavaScript Interaction: Storing Data in the Client, part 3
  • Records wanted! Fetching data from tables
  • Defining data containers: the "createDivs()" function
  • Showing database records: the "displayRecords()" function
  • 1 - 2 - 3 Next
  • Building paging links: the sequel
  • Building client-based result sets: making PHP and JavaScript interact

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


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


    (Page 1 of 7 )

    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.

    Introduction

    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


       · Over this last part of this series, I show a more complex example, building a...
       · While i must admit i skim these articles, I've had something up for a while, not...
       · Hello, thank you for the comments.Regarding your question, I've taken a look at...
       · Hihi, this article is very useful for web developer to perform tasks about...
       · Thanks for the tip to improve how to calculate the number of pages.Regards
     

       

    PHP ARTICLES

    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...
    - Working with the Email Class in Code Igniter





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT