help

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
What is required if i need to take decision from the parameters changed in the HTMlL form in same page without submitting the page?
I needed to load the values from a table to a select list when the value of another selection list is changed,but the form is not submitted.
Is there any idea without using sessions?
 
Hey ramesh!

There are two possibilities.

1. Using just Javascript. Having the proper javascript functions you can, with PHP, output the javascript arrays (already filled in from db) so you can populate your select list.

2. Using ajax, or properly, a xmlhttprequest to get the needed data so you can output/add options to your select list.

Both are easy to do, for the second one... just if you already have the needed xmlhttprequest function or whatever that will handle all that.
Anyway, i whould choose the first solution.

If you search the web for javascript populate, you'll find a few examples.
Note that the only thing you need to do is output the javascript arrays already filled with the needed data from the database.
 
Back
Top