Multiple Select Dropdown List with AJAX
This tutorial presents an AJAX script that can be used to create dynamically multiple Select lists with data from a MySQL table.First, a single select list is displayed on the page, then when the user chooses an option, it calls an Ajax function that acceses a PHP file that will return a select list according to the option selected. The Ajax function receives and displays the second select list.
When the users selects an option from the second select list, this script can display a third list of options, according to the options selected in the first an second select lists.
The script contains two files, a PHP file (named "select_list.php") with the code that selects data from a MySQL table and returns a select drop down list, and a JS file (named "ajax_select.js") with the Ajax code that accesses the PHP file.
You can copy and use the code for these files displayed below, or download the files from: Script Multiple Select Dropdown List
Check out this resource: http://coursesweb.net/scripts/select_lists_creator/create_select_lists.html
No comments:
Post a Comment