I am building an AJAX website which uses AJAX to replace links. In the different pages they have included different <script>s:
<script class="ajax">
var blah = blah;
function abc(){
Blah.blah.blah();
}
</script>
<p>
Blah blah blah blah blah...
</p>
And when the client clicks the link, the page will load the new contents and remove the scripts.
$("script.ajax").remove();
$("p").html(data);
But here's the problem. Although the script tag is removed, the function abc is still there, and I can't get rid of it. (variables also) I can't use :
abc = undefined;
since every page has different functions. Is it possible to achieve that or is it not even possible? Thanks.