I have a dropdown ,and based on its value I will have to create some other dropdowns and text boxes in the same page.Currently I am using iframe.Based on the dropdown value I show and hide contents in the iframe.The problem in this situation is that when I submit the iframe all the component (both hidden and shown) get submitted.
Modern methods use Ajax to perform "behind the scenes" requests to fetch the subsequent data. Please see topics in the HTML forum as this is a common question.
Ajax can be used,but then I will have to dynamically create the elements and position it.I am using the MVC approach. Apart from the stated requirements I have to display the validation error if the validation fails and if it succeeds then I have to popup a new window.How can I go about doing that
Hari, Do you know the maximum number of fields you need to have in your form? If yes, you could code the fields with dummy values and not display them. When the combo box is chosen, you do a submit and when page loads you can display the other fields based on choice. Hope that made some sense.
Originally posted by hari ganesh: Ajax can be used,but then I will have to dynamically create the elements and position it.I am using the MVC approach.
No, you do not have to dynamically create the elemens, and yes, Ajax can be used in an MVC approach.