![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 500 Pomógł: 1 Dołączył: 29.09.2009 Ostrzeżenie: (0%) ![]() ![]() |
Witam, mam taki problem, że pobieram dane ajaxem z osobnej stronki i wyświetlam je u siebie w divie
Problem w tym, że dane które pobieram mają w sobie javascript i gdy wyświetle je w tym divie skrypty te się nie wykonują Kod function load(strona) {
var ajaxRequest; try{ ajaxRequest = new XMLHttpRequest(); } catch (e){ try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById('home'); ajaxDisplay.innerHTML = ajaxRequest.responseText; } else { var ajaxDisplay = document.getElementById('home'); ajaxDisplay.innerHTML = "<center><img src='images/loading.gif' /></center>"; } } ajaxRequest.open("GET", strona, true); ajaxRequest.send(null); } |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.07.2025 - 04:43 |