Web Analytics Made Easy -
StatCounter submit syntax error - CodingForum


No announcement yet.

submit syntax error

  • Filter
  • Time
  • Show
Clear All
new posts

  • submit syntax error

    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";

  • #2
    try closing the popup after the person clicks "save" the first time.


    • #3
      without seeing the rest of the code, i've got no clues
      bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

      i am a loser geek, crazy with an evil streak,
      yes i do believe there is a violent thing inside of me.


      • #4
        A common reason for errors like that one you have just said is because of variables that are set, but then are not reset. Since we don't have all the code, we can't really see that for ourselves, but look around for variables that you forgot to "reinitialize" when you search a second time. Basically, look for things that you change only once, but then it doesn't change based on the situation.
        -Obiwan Jabroni
        May the Schwartz be With You