My function works great and, after some work around I got the values to post correctly, but where I'm running into trouble is re-populating those additional fields if I have to bring the user back to edit input that was not put in correctly.
$var = "js_function('varName1','varName2', 'varName3', 1 , '" . $post_val . "')";
using the posted variables that apply and then echoing that into the onload event handler in the body tag. This calls the same function that was originally used to add the row to have it add the row again and populate it with the already submitted data.
It all looks great, like it should work, but it doesn't and I'm wondering if there is something about the onload event handler which I don't know about. It was my understanding that the event handler executes when the page is fully loaded. If that is the case, my solution should work.
I don't know if there's some error I'm not seeing or if I'm trying to make the onload event handler do something it's not supposed to. I used a similar solution on another application and it works there.
To give a better understanding, here is the function:
Here is the coding for the event handler('initialize()' is a different function altogether - that works):
<body onload="initialize(),<?php echo $init ?>;">
And here is what it looks like from the source code when the page is displaying in a browser:
<body onload="initialize(),appendIaRow('AdmTbl','AdmValue','Administrator', 1, 'Joan'),;">