|
| | |||||||
| Internet Explorer Discuss IE7 or any other IE version. |
| | LinkBack | Thread Tools |
| |||
| Error in appendChild() (JavaScript, IE7) In some cases appendChild() changes the reference to the parent object to reference the object returned by appendChild(). Example: var form = document.forms['form1']; var input = document.createElement('<INPUT name="input1">'); input.type = 'HIDDEN'; input.id = 'id1'; form.appendChild(input); Sometimes the form variable at this point references the appended INPUT object. I havn't figured out when this happens, the same code works as expected in most cases. I have observed this in IE7.0.5730.11, not in IE6 or FireFox. |
| |||
| RE: Error in appendChild() (JavaScript, IE7) Update: I jumped to conclusions! The problem I had was when I did the following: var form = document.forms['form1']; var input = document.createElement('<INPUT name="submit">'); input.type = 'HIDDEN'; input.id = 'id1'; form.appendChild(input); form.submit(); // IE7 tries to call the INPUT object named submit, which of course gives an error message. It is NOT a bug in appendChild(), although the behaviour is new in IE7. BR - L |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| javascript error in every page | Andrë | Internet Explorer | 3 | 05-06-2007 08:44 AM |
| Silverlight JavaScript error in Firefox | Loren | Tablet PC Bloggers | 0 | 05-04-2007 06:10 PM |
| Silverlight JavaScript error in Firefox | Loren | Tablet PC Bloggers | 0 | 05-04-2007 05:00 PM |
| Re: Flash & Javascript Error Message | Spikey | Windows XP | 0 | 01-04-2007 01:46 AM |
| Re: Javascript error | sangeethavani12@gmail.com | Windows XP | 0 | 01-04-2007 01:45 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |