Alright. First of all, I told you to replace IDs with classes, which you didn't do. Since the code is now fetching elements by their class name, instead of their ID, those class names have to be there, which they are not.
That means, each of those forms have to have class="submit", each of those usern inputs has to have class="usern", and so on. And none of those are allowed to have an ID (which they still do have in your code), since that ID wouldn't be unique, with multiple forms on the page. I did mention that, didn't I?
Next, if your code isn't able to fetch those elements, because you didn't add the right classes, why does the submit work at all? The answer to that is that for some reason you have a completely different piece of code in there, which also tries to handle the form submission. You got
action="javascript:insert()" in each of those forms, and your insert function looks like this:
PHP Code:
function insert() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('insert_response').innerHTML = "Just a second..."
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var usern = encodeURI(document.getElementById('usern').value);
var joborder_id = encodeURI(document.getElementById('joborder_id').value);
var site_id = encodeURI(document.getElementById('site_id').value);
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'insert.php?usern='+usern+'&joborder_id='+joborder_id+'&site_id='+site_id+'&nocache = '+nocache);
http.onreadystatechange = insertReply;
http.send(null);
}
That's a very bad case of code duplication, where that bogus function (bogus because it uses IDs instead of classes) suddenly takes over if your actual submission handling code fails (which it does, because you didn't adapt the HTML). Get rid of that "javascript
:insert()" stuff, and of that whole bogus function.
Also, you might want to read some jQuery tutorial, since the fact that you didn't adapt your HTML like I told you to indicates that you don't really understand how jQuery selectors work.