Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DotGeek:
Dynamically Repopulating Forms
Jan 27, 2004 @ 13:11:30

New from DotGeek.org this morning, there is a new tutorial seeking to help you dynamically fill and update form elements without having to reload the page.

In Dinamycally fill form elements in a dynamically (they should really run this stuff through a spell-check), the author shows you how to combine the power of PHP with the client-side abilities of Javascript to make an easy to use script that will grab the rest of the data from the database via an external call. They chose to use an ActiveX object to make the call back to the script, returning a user list and parsing it. They then use this listing to repopulate the form element (a select in this case) with that new data.

Granted, there are several ways to do this same thing, I wonder how cross-platform this example is. I've always felt a bit more comfortable with just grabing all of the information I could ever need from the database and formatting it in Javascript arrays...

tagged:

Link:


Trending Topics: