12-19-2009, 03:08 PM
(12-19-2009, 02:49 PM)Master of The Universe Wrote: [ -> ]Ajax would do it, http://www.w3schools.com/Ajax/Default.Asp
Could you give me an example of some code I would use?
(12-19-2009, 02:49 PM)Master of The Universe Wrote: [ -> ]Ajax would do it, http://www.w3schools.com/Ajax/Default.Asp
(12-19-2009, 03:08 PM)Rob Wrote: [ -> ]Could you give me an example of some code I would use?
<?php
$content = file_get_contents("http://www.google.com/");
$matches = null;
preg_match_all("/<title>(.*?)<\/title>/", $content, $matches);
echo $matches[1][0];
?>
<html>
<body>
<script type="text/javascript">
function ajaxFunction()
{
var xmlhttp;
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
document.getElementById("content").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","extern.php",true);
xmlhttp.send(null);
}
</script>
<div id="content" onclick="ajaxFunction();">
a
</div>
</body>
</html>
(12-19-2009, 03:14 PM)Master of The Universe Wrote: [ -> ]reserving a place... just a sec
(12-19-2009, 03:14 PM)Master of The Universe Wrote: [ -> ]reserving a place... just a sec
(12-19-2009, 03:15 PM)Grizzly Wrote: [ -> ]Sorry to go a little off topic here, but, @ MotU, "reserving a place....just a sec." Lol.
(12-19-2009, 03:33 PM)Grizzly Wrote: [ -> ]Yeah, I didn't mean to disappear on you like that. I had to take my wife to the hospital a couple hours ago because she has appendicitis and I was on the phone with her while she was letting me know what the doc's said. But, he appears to have it all under control.
(12-19-2009, 03:15 PM)Grizzly Wrote: [ -> ]Sorry to go a little off topic here, but, @ MotU, "reserving a place....just a sec." Lol.