Can a field communicate to a server and return information to another field without retrieving the w

M

marcelf3

I´ve got a sql table which has 3 fields.
Their relation to each other is like this example.

| CARS | YEAR | PRICE |
ford 2000
ford 2001
ford 2003
volkswagen 1999
volkswagen 2000

I am developing an ASP web page that modifies a specific registry.
So, it loads the information to some fields, but the user will be able
to change only the "PRICE" field.
I have to create two selects, one for "CARS" and other for "YEAR".
But the "YEAR" field will only contain the correspondent years for each
car the user selects. Example: selecting "ford" in the "CARS" <select>
box, only the years "2000", "2001", "2003" would be automatically
loaded in the "YEAR" <selec> box.
How could i implement it? All sorts of suggestions will be welcome.
Thanks in advance.
Marcel;.
 
R

R. Rajesh Jeba Anbiah

I´ve got a sql table which has 3 fields.
Their relation to each other is like this example.

| CARS | YEAR | PRICE |
ford 2000
ford 2001
ford 2003
volkswagen 1999
volkswagen 2000

I am developing an ASP web page that modifies a specific registry.
So, it loads the information to some fields, but the user will be able
to change only the "PRICE" field.
I have to create two selects, one for "CARS" and other for "YEAR".
But the "YEAR" field will only contain the correspondent years for each
car the user selects. Example: selecting "ford" in the "CARS"
box, only the years "2000", "2001", "2003" would be automatically
loaded in the "YEAR" <selec> box.
How could i implement it? All sorts of suggestions will be welcome.

No idea, why did you post here in c.l.php while programming in ASP.
Anyway...
1. Pure PHP way: Put 2 or 3 steps so that you get user inputs from each
step like Cars in first step, year in second step, etc.
2. Create on the fly JavaScript code using PHP. The JS code then should
work in such a way that if you choose cars, it has to populate year in
another select list.
3. JavaScript + PHP with XMLHttpRequest technique
<http://jibbering.com/2002/4/httprequest.html>
4. Combination of above.

p.s.: Google to find more resources.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top