Forum Moderators: coopster

Message Too Old, No Replies

possible to populate combobox in PHP without reloading page?

possible to populate combobox in PHP without reloading page?

         

jeephp

5:22 am on Jun 3, 2005 (gmt 0)

10+ Year Member



Hello!

is it possible to populate the comboxbox in PHP without reloading the

entire page?

we have three combo boxes the values of second combobox is populated from

database according to selected item in first combobox but I don't need to

regresh entire page!

Thanks!

dreamcatcher

7:09 am on Jun 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

As PHP is server side it needs to send a request to the server to perform an action, so it won`t be possible I`m afraid. You may be able to create the desired affect using DHTML/Javascript/ though, so look into that.

dc

figment88

7:29 am on Jun 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use a technique called server-side polling, but the latency makes it seem like it is not working to the end-user.

You can also fake-it with an iFrame which if done well is less disruptive than refreshing the entire page.

Or, as the previous poster suggested and what most people do is use some type of dynamic HTML. If you have lots of different combinations of values (e.g. every city for each state) you are going to run into limitations with this approach and have to hit the server.