Merhaba;
php dosyasını javascript yardımı ile html bir sayfaya include etmek istiyorum.Yardımcı olursanız sevinirim.
HTML Kod İçerisine JavaScript include Etmek
5
●1.975
- 27-07-2009, 19:34:02Eposta Aktivasyonu Gerekmekte
<script type="text/javascript" src="http://siteadin.com/cartcurt.php">
- 27-07-2009, 20:18:23php betiğini include edemezsin ancak betiğin çıktısını alabilirsin. Bunun için de XMLHttpRequest kullanmalısın.
Şunun gibi bişey olur heralde
<html> <head> </head> <body> <div id="stats">a</div> <script> function processStateChange(){ statusDiv = document.getElementById("stats"); if (req.readyState == 0){ statusDiv.innerHTML = "UNINITIALIZED"; } if (req.readyState == 1){ statusDiv.innerHTML = "LOADING"; } if (req.readyState == 2){ statusDiv.innerHTML = "LOADED"; } if (req.readyState == 3){ statusDiv.innerHTML = "INTERACTIVE"; } if (req.readyState == 4){ statusDiv.innerHTML = "COMPLETE"; statusDiv.innerHTML = req.responseText; } } req = new ActiveXObject("Msxml2.XMLHTTP"); if (req) { req.onreadystatechange = processStateChange; req.open("GET", "http://localhost/deneme.php", true); req.send(); } </script> </body> </html>
Bi de ona baksak