In short, here's some PHP code that would help you--
PHP Code:
<?php
ob_start(); //start output buffer*
include('http://address.com/page/and/stuff.php'); //include the page
//*if include is called normally, it just outputs it right away
//output buffer grabs that info instead
$page = ob_get_contents(); //now store to variable
$page = str_replace("'",''',$page); //replace ' with html entity
//if not, that will conflict in javascript later on
ob_end_clean(); //end output buffer
?>
Do your javascript stuff....
<script type="text/javascript">
....
var page = '<?php echo $page; ?>';
....
</script>
HOWEVER, note that it will be a problem if the included page contains stuff that conflicts with javascript, though I'm not sure what it is. I included a line changing ' to ', so that should be good, but it may be a bit more complex.
However, this doesn't solve your problem, but it does get you ALL of the html, etc. from the page.
Bookmarks