Been trying to replicate your situation.

the best solution i see is to not load the variables.

may be if you can explain your environment in more detail. like :

this is how I understand.

lets assume we have our container
<div id="container">
within this container we have out element
<div id="target">
we basically loading the full html. css and js from this page into our
target element
$.ajax ({
url:b.html,
success : function(html) {
$("#target.").html(""); // ensure the target is empty
$("#target").html(html); // fill target with everything
// if you want only the html within the body tag remove the commenting from
the following line
// $(#target").html($("body", html()));
}
});

Now from what i gather b.html as some ajax functions that you want to
maintain but there are some functions in there which you do not want.

my solution is

create seperate .js files instead of having script in the b.html page.
so in b.html in the head area you would have something like
<script type="text/javascript" src="js/ajax.js"></script>
try to ensure that all your js files are external and there is no internal
js on the page.
instead of loading the whole page - just load items within the body tag and
in this ajax call load the appropriate scripts into  your page.
so your ajax function wil be like

$.ajax ({
url:b.html,
success : function(html) {
$("#target.").html(""); // ensure the target is empty
// load script refferences
 $(#target").append('<script type="text/javascript"
src="js/ajax.js"></script>');
 $(#target").append($("body", html()));
}
});


On Thu, Jul 2, 2009 at 3:51 AM, Veeru <swamyve...@gmail.com> wrote:

>
> anybody??

Reply via email to