Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> getElementsByTagName po zapytaniu ajaxowym
adamli
post
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 18.07.2008

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


W zypytaniu ajaxowym mam:

success: function(xhr) {
document.getElementById('main').innerHTML = xhr.responseText;
var myDiv = document.getElementById('main');
var cells = myDiv.getElementsByTagName('script');
eval(cells[0].innerHTML);

dziala swietnie w FF niestety IE wywala
"0.innerHTML jest 0 albo nie jest obiektem"

jaki problem ma IE z "var cells = myDiv.getElementsByTagName('script');"

Z gory dziekuje za odpowiedz
Adam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
adamli
post
Post #2





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 18.07.2008

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


to nie jest rozwiazanie... w twoim przykladzie jest

elem = document.getElementsByTagName(tag);
pozniej jest uzyte elem.length

u mnie jest var cells = myDiv.getElementsByTagName('script');
i u mnie IE cells.length zwraca 0 a Firefox 1
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 6.10.2025 - 02:44