By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,985 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,985 IT Pros & Developers. It's quick & easy.

Can a field communicate to a server and return information to another field without retrieving the whole html code again?

P: n/a
Ive 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;.

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
marce...@yahoo.com wrote:
Ive 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.


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.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #2

P: n/a
Marcel -

If you are interested in a technique, phpbuilder.com also has an
article on how to dynamically populate drop-downs. You may not know PHP
but the article is straightforward to understand and you should be able
to extrapolate the concept to ASP.

Otherwise, sleep on Rajesh's great suggestions.

And, please do not cross-post to so many groups! Posting to more groups
does not mean you will get better responses. Just a friendly advise so
that you don't upset people all over the world.

Thanks,
--Kartic

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.