I have a entry form. Below it, I want to show a grid containing existing records. As the user clicks on a row of the grid, the values must get filled in the fields of the form above.
Is there any way to do this without refreshing the page?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If all the info the form needs is already present on the page then AJAX would be overkill and simple Javascript would do the job perfectly. This isn’t tested, but;
in javascript;
This works on a single element but should be a reasonable starting point as the process is easy to adapt to whole rows. Simply put the onclick event on the tr element and step through the various children a bit more to extract the relevant data.