- kindle screen test
- accessdatasource converting empty strings to null values
- paypal ipn returns invalid
- cannot manually edit applicationhost.config
- must declare the scalar variable
- classic asp and access not working on windows 2008 64bit
- asp.net page titles are blank
- sql to get totals for last six months
- white space being counted as a node
- cross page posting not working
- collection is read only exception
- PayPal sending incorrect carrier information
- paypal guest user notice
- classic asp dictionary not working
- IE8 not supporting innerHTML
- differences between jet and odbc
- sugarcrm not inserting email
- select random records from access
- button click event firing twice
- how to send an email using cdosys
- installing perl on win2003 64 bit
- asp.net page event order
- rewrite rule for subdomains only
- extra items in javascript array
- IE7 margin auto not working
- IE7 border style dotted glitch
- ByRef and ByVal in vbscript
- weather rss feed
- Classic asp crib sheet
- Firefox onsubmit image change
- limit records in access
- AccessDataSource is thick
- double margins in IE6
- extra image padding in html emails
- decimal places in linux flash player
- broken emails in outlook 2007
- double spaced IE list items
- cannot remove movieclip
articles:
IE8 not supporting innerHTML
consider this javascript snippet:
document.getElementById('optionsTable').innerHTML = '<tr><th>Option</th><th>Price</th><th>Stock</th></tr>';
There is a table on the page with id="optionsTable", and the table has always loaded before the function is called.
This piece if javascript was being called to reset a table that allows option/price/stock information to be given to products. It works in Opera and Firefox (and probably IE 6, possibly IE 7) but it doesn't work in IE 8 .
Does IE 8 restrict your manipulation of the DOM to some extent? I can only assume that is does, as I was able to achieve the same effect (in albeit a slightly less hacky way than using innerHTML) like this:
var tmpNumRows = document.getElementById('optionsTable').rows.length;
for(row=1;row<tmpNumRows;row++){
document.getElementById('optionsTable').deleteRow(row);
}
So there was nothing wrong with my table, and IE was happy for me to mess around with it via DOM manipulation, it just wanted me to do it properly rather than abusing innerHTML. So while this was quite irritating as it created a bit of work, it was certainly an enlightening exercise. Does this mean that IE's DOM / javascript engine is stricter than the other browsers?
Post a comment
