Pinned topicAJAX + PHP + SQL FORM

‏2011-08-24T14:41:54Z
|Tags:

Answered question
This question has been answered.

Unanswered question
This question has not been answered yet.

Hi everyone,

I know this is probably something really easy around because it's a very common use for AJAX.
I've search and found many examples online and tried a few. I'm not sure if I'm doing something wrong or is it because I'm using joomla.

This is what I'm trying to achive:

I have 2 select boxes. One is named "TIPO DE VIAGENS" the other one "PRODUTOS"

The first one is populated manually since there is 15 limited options for "TIPO DE VIAGENS"

The second one is populated by the MySQL Database which can mean 0, 1, or more options.

Each "TIPO DE VIAGEM" option has a table associated in the Database. So if the user picks one a query is made to the database.

So basiclly what I'm trying to do is.. by selecting a TIPO DE VIAGEM option.. a PRODUTOS list of options populated from the database would appear.

I have this currently working with some Javacript code that reloads the page.. but I'd like to do this without reloading to avoid many problems associated with this (like the form getting empty for examples).