I have a form called add. In it is a hidden field called cID. I have a link on the form that opens a pop up window for someone to do a search for a company. When that company comes up in the results, they can hit save and it puts the company name and id into the original add form. It also them resets the action, target and method of the form to submit to itself. Then the add form reads in the value of cID and populates a bunch of fields with information from a database based off that cID. The problem comes when I try to hit the link a second time to find a different company. When I click save, it gives me a "syntax error" on the line that submits the add form back to itself again. It's strange that it works fine the first time but not the second. I've gone over the form thinking there's something different on it from the first time, but there isn't. Everything is the same and there are no overlapping form tags or anything. It only bombs in IE, but it works fine in NS 4.8 and 6. Here's a little bit of the code that does the work on the pop up window. Any ideas what else I could try? Thanks.
top.window.opener.document.add.cID.value = document.codeboxes.CurrentEmployerCompanyId.value;
top.window.opener.document.add.action = "add.asp";
top.window.opener.document.add.method = "get";
top.window.opener.document.add.target = "_self";
top.window.opener.document.add.submit();
top.window.opener.document.add.cID.value = document.codeboxes.CurrentEmployerCompanyId.value;
top.window.opener.document.add.action = "add.asp";
top.window.opener.document.add.method = "get";
top.window.opener.document.add.target = "_self";
top.window.opener.document.add.submit();
Comment