Skip navigation
Currently Being Moderated

Form submission in IE9

Aug 28, 2012 1:57 AM

Hi All,

 

I test the coldfusion program in IE9. However, I find some problems.

 

I use javascript to add new input box (type=hidden, name="attach") in the form. Before submit the form, I use document.getElementsByName("attach") to check its existence. It shows me there is one item with the name "attach".

 

However, when I submit the form, it shows me error "cannot find form.attach".

 

I find that IE8 can pass it correctly. But it fails in IE9.

 

Can anyone help me to solve this problem?

 
Replies
  • Currently Being Moderated
    Aug 28, 2012 5:15 AM   in reply to Phinehas1234

    Could you share your javascript and form code so we can have a look?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 9:11 AM   in reply to Phinehas1234

    Okay, how about this.  Try dumping the entire Form scope out from your CF page.  What do you see?  This will show you every form field that was submitted with the request.

     

    <cfdump var="#form#" />

     

    Is your field there?  If not, then it is not being submitted.  You can use something like Fiddler to examine the http headers to verify it is being sent or not.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2012 5:33 AM   in reply to Phinehas1234

    Apparently there are issues with using appendChild in IE9 http://msdn.microsoft.com/en-us/library/ms535934%28v=vs.85%29.aspx

    It looks like IE9 only supports it if you are running in standards mode.

     

    There are actually several posts that talk about this issue.  Like this one http://stackoverflow.com/questions/436710/element-appendchild-chokes-i n-ie

     

    Just do a Google search for "javascript appendchild ie9" and start reading.  I'm sure you can find an example that works for you.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points