I have one php file which fetch the data and display in html with jquery slider which is working fine in directly run demo.php.
I have issue with when i fetch this file data (demo.php) then display the HTML in new page (script.html) but slider effect and other jquery event not working in this page.
This is my code which is include in new file (script.html).
<div id="widget-frame"></div>
<script>
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("widget-frame").innerHTML =
this.responseText;
}
};
xhttp.open("GET", "demo.php", true);
xhttp.send();
</script>
Actually i need to make one type of widget so user copy the above code and place in his/her project file then appear the demo.php file content in particular section.
So please let me know how i can load the jquery in it.
I used the iframe :
<iframe src="demo.php" frameborder="0" style="border:0; width:100%; min-height: 350px; overflow:hidden;" scrolling="no"></iframe>
iframe works fine but it's not working properly in iphone so i need to use XMLHttpRequest method.
Thanks in advance.