Unanswered: How to populate database vale in drop down with refreshing screen
I have a problem in populating database data in dropdowm box.
I had 4 drop down box and 4 table, based on first drop down selection second dropdown value should get populate,based on second 3'rd drop down should get populate and based on 3'rd dropdown selection 4'th drop down should get populate.
In your first dropdown (SELECT tag), how many options are there? How many in the second dropdown?
In short, how many possible combinations are there? And, more importantly, how are these related? For instance, do you relate them using their index number, or does the value tell us the name of the next menu that will appear?
One approach might be to, when the page is first loaded. create each dropdown and put them inside a DIV tag with the display to none (ex. document.all.divName.style.display = "none"). Then, attach an onChange event handler to the first dropdown so that, when the user changes it, it pulls the name of the next dropdown out of its value property and triggers that dropdown to become visible.
The code itself is not really that hard... But the logic and planning might be VERY complicated, depending on how many different dropdown combinations are possible.
In order to do this without postback, all data needs to be sent into your DHTML in some manner. With the .NET framework, the postbacks are relatively simple. If you are not limited by the connection speed, you should consider a postback.