Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [javascript] problem z IE, pomocy
gibffe
post
Post #1





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 23.09.2004

Ostrzeżenie: (0%)
-----


Witam, ponizej zamieszczam kod ktory przedstawia prolem.
Klikajac fillTable (pod firefoxem) w td o id content tworzone sa
jednowierszowe tabele ktore sie wyswietlaja. Pod IE tabele sie tworza,
sa jako dzieci owego td (sprawdzalem w dom inspect) jednak nie odswieza
sie content tego td - nie widac zmian. Co z tym zrobic ?

  1.  
  2. </head>
  3.  
  4.  
  5. <script type="text/javascript">
  6. function fillTable() {
  7. var oTable = document.createElement("table");
  8. var oTr = oTable.appendChild(document.createElement("tr"));
  9. var oTd = oTr.appendChild(document.createElement("td"));
  10. oTd.innerHTML = "aaa";
  11.  
  12. var content = document.getElementById("content");
  13. content.appendChild(oTable);
  14. }
  15.  
  16.  
  17.  
  18. <a href="java script:fillTable();">fill table</a>
  19. <tr>
  20. <td id="content"></td>
  21. </tr>
  22. </body>
  23. </html>


ok problem sie rozwiazal, trzeba samemu dodawac tBody, firefox go ignoruje i wyswietla tabele
tak czy inaczej, IE nie
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 11:23