This is a discussion on "simple js doesn't work with IE7 (work with FF1.5)" within the JavaScript Forum section. This forum, and the thread "simple js doesn't work with IE7 (work with FF1.5) are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
simple js doesn't work with IE7 (work with FF1.5)
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
simple js doesn't work with IE7 (work with FF1.5)
Hi,
With IE7, the following code doesn't add the table to the page when button is clicked. the code is also uploaded to http://startupisrael.com/gpazi/triptouch/test.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> </head> <body> <script language="Javascript" type="text/javascript"> function func() { var mydiv = document.getElementById("mydiv"); var mytable = document.createElement("table"); var mytr = document.createElement("tr"); var mytd = document.createElement("td"); var mytext = document.createTextNode("this is my text"); mytd.appendChild(mytext); mytr.appendChild(mytd); mytable.appendChild(mytr); mydiv.appendChild(mytable); } </script> <div id="mydiv"><button onclick="func();">click</button></div> </body> </html> ![]() |
|
|
![]() |
| Tags |
| js javascript ie |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Javascript menu - does not work on title page, but does work on other pages | Crystal Phoenix | Starting Out | 4 | Mar 24th, 2008 19:40 |
| Why does this work? | masonbarge | JavaScript Forum | 1 | Jan 1st, 2008 20:53 |
| Why does this work? | Kropotkin | Web Page Design | 9 | Aug 6th, 2007 13:24 |