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?
In our coding, we only create some textbox within a div component in a sub-windows(windows.open). Then, use appendChild to add this div to our form (parent windows). I have checked the input fields are added correctly.
Then, only submit the whole form when press submit button.
However, it cannot find form.attach.
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.
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.
North America
Europe, Middle East and Africa
Asia Pacific