Home arrow JavaScript arrow Storing Banner Data in MySQL Tables for a Dynamic Banner System with AJAX
JAVASCRIPT

Storing Banner Data in MySQL Tables for a Dynamic Banner System with AJAX


If you're a web developer searching for a guide on how to build a dynamic banner application with AJAX, look no further. This series of articles might be what you need. Welcome to the final tutorial of the series that began with "Creating a Dynamic Banner System with AJAX." Made up of three articles, this series develops a basic web application that uses AJAX-based HTTP requests to display a group of dynamic banners based on a predefined time sequence.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 5
August 01, 2007
TABLE OF CONTENTS:
  1. · Storing Banner Data in MySQL Tables for a Dynamic Banner System with AJAX
  2. · Listing the entire source files of the previous banner application
  3. · Fetching banner data from MySQL
  4. · Completing the banner application

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Storing Banner Data in MySQL Tables for a Dynamic Banner System with AJAX
(Page 1 of 4 )

Introduction

Now that you hopefully have a clear idea of the topics covered by this series, let me reintroduce some important concepts surrounding the implementation of this AJAX-driven banner mechanism, which were deployed in the previous article. As you'll possibly recall, over the course of that tutorial I introduced some changes to the original structure of the original banner system, specifically modifying the definition of one of its primary JavaScript functions, called "displayBanner()."

The most evident consequence in doing this modification was providing the application with the capacity to fetch the set of predefined banners directly from a simple XML file. This change enabled us to avoid needing the code and additional PHP file that initially retrieved all of the banner data from a plain text file. Additionally, since the aforementioned JavaScript function used the XML part of AJAX to display the different banners periodically on the browser, its overall structure became slightly more compact and maintainable.

All right, at this point I already mentioned all the pros of this AJAX-driven application, but I purposely didn't stress its main weakness, so I believe now is a good time to do it, right? As you'll probably remember, the sequence in which the different banners were shown was originally controlled by a unique, global JavaScript variable. This approach can not be recommended in terms of good programming habits.

Thus, considering that this issue should be fixed quickly, in this last installment of the series I'm going to adapt the original structure of the banner system to give it the ability to read all the banner-related data from a simple MySQL database table. In this way we will naturally avoid relying on a rather undesirable global JavaScript variable.

Now, let's get rid of the preliminaries and learn together how to modify the original AJAX application to work with a basic MySQL database table. Hopefully, it's going to be an instructive experience!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials