cuvaibhav Posted August 30, 2008 Share Posted August 30, 2008 Hi, I have a drop down whose values are as follows and will be stored in a sql table: -one -two -three When a value is selected in drop down then a certain list has to be displayed which needs to be pulled from sql table... list will vary based on selection... e.g., When one is selected then display following items: 1] one 2] one one 3] one one one I am new in php so please guide me how to make this happen or please provide a sample code.... Thanks and Regards, Vaibhav Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/ Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 You'll need Ajax for this. Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629417 Share on other sites More sharing options...
JasonLewis Posted August 30, 2008 Share Posted August 30, 2008 I'll explain a bit more. Ajax = asynchronous JavaScript and XML It will let the client communicate with the server without reloading the page. So what you would need to do is look into Ajax a bit more. It's not to hard, once you get the gist of it. Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629425 Share on other sites More sharing options...
Fadion Posted August 30, 2008 Share Posted August 30, 2008 Or if you don't want to get your hands too dirty with AJAX, have a look at this JavaScript Framework. It will make your JavaScript/AJAX coding life a lot easier. Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629432 Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 Or if you don't want to get your hands too dirty with AJAX, have a look at this JavaScript Framework. It will make your JavaScript/AJAX coding life a lot easier. P.S: script.aculo.us has some effects and stuff on top of Prototype. It's much cooler. Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629442 Share on other sites More sharing options...
Fadion Posted August 30, 2008 Share Posted August 30, 2008 P.S: script.aculo.us has some effects and stuff on top of Prototype. It's much cooler. Yeah but script.aculo.us alone can't do nothing. Prototype is the core, but you know that for sure Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629443 Share on other sites More sharing options...
cuvaibhav Posted August 30, 2008 Author Share Posted August 30, 2008 isn't it possible in php at all........ because php is being till now on the server......... Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629456 Share on other sites More sharing options...
JasonLewis Posted August 30, 2008 Share Posted August 30, 2008 PHP happens server-side. What you are wanting is for something to happen client-side. You can do it with PHP if you want the page to refresh. Link to comment https://forums.phpfreaks.com/topic/121946-drop-down-event-which-calls-php-scripts/#findComment-629476 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.