I have been trying to call 4 JS functions from the html body when the page loads.
Each of these functions are calling JSP servlet to fetch data from database and populate in the respective list boxes. I am working on the edit screen where I am trying to prepopulate the listbox.
I am trying out something like this:
//call the JS to prepopulate the metadata
function populateOnPageLoad(){
populateA();
populateB();
populateC();
populateD();
}
I also tried calling all the 4 functions directly in body onload.
It seems that it is able to call only populateD() and display the data in the listbox. I have tested each of these in the insert operation and the JSP servlets work fine. I even changed the order of these functions to check if it is calling just the last function, but it doesn’t seem to be working that way.
What could be the issue here and possible solution for this?
Thanks!
I am passing the record id (which I am trying to edit) to populateOnPageLoad() when I am loading the page. When I do so, it populates the relevant data from the previous record into the respective list boxes