Go Back   Tech Support Forum > Microsoft Support > Internet Browsers and Email > Internet Explorer & Edge Forum

User Tag List

javascript code doesn't work with IE7 (work with FF1.5)

This is a discussion on javascript code doesn't work with IE7 (work with FF1.5) within the Internet Explorer & Edge Forum forums, part of the Tech Support Forum category. I cannot find out why the following code doesn't work with IE7. Pressing the button doesn't add the text (table)


Closed Thread
 
Thread Tools Search this Thread
Old 06-10-2007, 03:07 AM   #1
Guest
 
Join Date: Jun 2007
Posts: 2
OS:



I cannot find out why the following code doesn't work with IE7. Pressing the button doesn't add the text (table) to the page.
The code also loaded to https://startupisrael.com/gpazi/triptouch/test.php.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://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>
gpazi is offline  
Sponsored Links
Advertisement
 
Old 06-10-2007, 04:04 AM   #2
Guest
 
Join Date: Jun 2007
Posts: 2
OS:



got the answer -
IE requires a tbody element to insert a table using the DOM
gpazi is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript don't work after system restore
Sup, I'm having this problem with my browser, where javascript links do not respond when clicked. I've already 'manually' installed java twice from www.java.com, and nothing has changed. This problem gave me few disadvantages, such as when browsing, and also I'm unable to delete my hotmail mails...
yang Windows XP Support 3 06-13-2005 10:41 AM
No 5.1 sound
Hello, recently I installed a new mobo, but can't get soundcard to work properly. Mobo = gigabyte 7VT600-P-RZ; sound card = SB audigy platinum 1. The remote control centre is not being recognised/detected so I can't use optical out from front panel. So I use output from back and only 4 (plus sub)...
Anathema666 Sound Cards 4 06-07-2005 03:35 PM
Please anyone help tweak my code
Please Help my code for this program is listed below what the program is supposed to do is also listed below. I can't get it to work. The problem Write a program to compress a message consisting of the ten symbols A, B, C, D, E, F, G, H, I, and J. You should create a variable-length code...
moonduke Programming 2 05-07-2005 08:32 PM
Code 19 - USB ports will not work, yellow exclamation mark beside them...
I have a Dell 4600 running XP Home and all my USB ports have suddenly stopped working. When I go to the device manager and expand the Universal Serial Bus Controllers, each of the Intel(R) 8280 1EB VBB Universal Host Controller has a yellow exclamation mark beside them. When I check their...
Eltoddo Windows XP Support 2 04-11-2005 11:50 AM
javascript does not work in general
Hi guys, On my Desktop computer anything javascript related stopped working. I had XP-sp1, installed sp2. One day all javascript related things (Any link on the Internet that uses javascript) just stopped working. When I click on a link that uses javascript to open another window let's say, it...
zhang1983 Windows XP Support 4 10-15-2004 04:35 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 07:16 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts