-
How do i stop the external page from loading over and over again after a user clicks on #testlink link
-
How can i impliment toggle() so that when my external page is loaded the next time a user clicks on the #testlink link it will collapse the #container div
-
How can i pass $testlinkvariable onto the .load() function so i can use that variable in the external page as to get data
THNAKS
main
<html>
<head>
<script>
function updateElement(el_id, action) {
$('<div id="info" />').load('http://www.site.com/new_file.html #movies', function() {
$(this).appendTo('#container')
.slideDown(1000);
});
return false;
};
</script>
</head>
<bodY>
<div id="container"></div>
<a id="testlink" onclick="javascript:updateElement('<?php echo $testlinkvariable ?>','');">Test Link</a>
</body>
</html>
new_file.html
<ul id="movies">
<li style="font-weight: bold; list-style-type: none;">My Favorite Movies</li>
<li>Contact</li>
<li>Shawshank Redemption</li>
<li>Napoleon Dynamite</li>
<li>Back To The Future</li>
<li>The Goonies</li>
<li>Cinderella Man</li>
<li>Apollo 13</li>
</ul>