hi there
I have a drop down menu which I retreive from DB. at the end of the options I added 'other'. --> when the user selects other option I want another drop down menu to be created to me and retreived data from DB as well.
how can I do that
thanks
dynamic drop down menu
Moderator: General Moderators
Re: dynamic drop down menu
If you have to retrieve more data from the server, you will have to use AJAX, the Javascript way to get data from the server without loading a new html page. Google for javascript ajax and you will find loads of info.
Re: dynamic drop down menu
yes I know it is not effecient and I know AJAX is better, but I can't go for ajax cause I am not using ASP.NET .. I am just using simple HTML
I need any simple code for that, I google it and there is nothing useful
I need any simple code for that, I google it and there is nothing useful
Re: dynamic drop down menu
I said nothing about being efficient or that AJAX is better than something else. AJAX also has nothing whatsoever to do with ASP.NET.Shamma wrote:yes I know it is not effecient and I know AJAX is better, but I can't go for ajax cause I am not using ASP.NET .. I am just using simple HTML
I need any simple code for that, I google it and there is nothing useful
If you don't use Javascript, it is impossible to do anything based on what the user chooses in a dropdown list. HTML does nothing beyond displaying the page. AJAX is just Javascript, but it relies on there being a server-side script to respond with the required data. Server-side scripts would be PHP, Perl, or VBScript (if you are using a Microsoft web server).
Re: dynamic drop down menu
ok, I am using javascript to validate inputs and to store them in cookies. I am using a php lanuage as well
Can you give me a good example then of how to generate a dynamic drop down menu ?
Can you give me a good example then of how to generate a dynamic drop down menu ?
Re: dynamic drop down menu
Here is a thorough tutorial on doing exactly what you asked about:
http://www.webmonkey.com/2010/02/build_ ... down_menu/
I am happy to provide the link to you, but for your future reference, all I did was Google ajax tutorial dropdown and pick the first result I found. If you will learn to do this, you will usually find answers to your questions much faster than in a forum like this.
Good luck with your project.
http://www.webmonkey.com/2010/02/build_ ... down_menu/
I am happy to provide the link to you, but for your future reference, all I did was Google ajax tutorial dropdown and pick the first result I found. If you will learn to do this, you will usually find answers to your questions much faster than in a forum like this.
Good luck with your project.