I was able to get your html and scripts working in IE, Firefox, and Opera by doing the following:
Possibly due to the file structure I was using, the script files weren't loading. I changed the script tags to reference relative paths to the html page, from:
<script language="JavaScript" src="/admin/javascript/combine_lastfirst.js"></script>To:
<script language="JavaScript" src="../javascript/combine_lastfirst.js"></script>
Change comblf() function to the following, explicitly:
function comblf() { var last = document.forms[0].elements['[01]Last_Name'].value; var first = document.forms[0].elements['[01]First_Name'].value; if(last.length > 1 && first.length > 1) { document.forms[0].elements['[01]LastFirst'].value = last + ', ' + first; } }As you can see, the element id's will not need to be used at all, so can be eliminated from the first, last, and lastfirst fields.
Name field lines can be changed as follows:
First and last:
<td style="width: 265px"><input type="text" name="[01]First_Name" value="" size="15" onkeyup="comblf()" /> <input type="text" name="[01]Last_Name" value="" size="20" onkeyup="comblf()" /></td>LastFirst:
<input type="hidden" name="[01]LastFirst" value="" style="width: 228px" /></td>
Test script I used in the address bar after filling out the first and last name to display the combined field:
javascript:alert(document.forms[0].elements['[01]LastFirst'].value);
Let me know if you have any problems. The function must be exactly as I have listed it, referencing the element names, rather than the id's.