hopefully i'm asking this right..
Here's my situation: I have html running inside an iframe that makes a controller call to get back a view with a javascript file referenced in it..
so.. main page:
<html>
<body>
<iframe src="page2.html" />
</body>
</html>
page2.html:
<html>
<body>
<script>
$.ajax({
url: "controller\myview",
type: "POST",
data: null,
dataType: "html"
}).done(function(view) {
var body = $(window.top.document.body);
body.append(view);
});
</script>
</body>
</html>
myview sends back a typical but has a tag at the bottom of it that creates a dialog of the form. the whole point here is to get the jquery ui dialog outside of the iframe, which when i inspect the DOM it's outside the iframe; however, when the javascript that is now in the mainpage executes it seems to think it's till in the iframe.
it looks like i have a scope problem but i don't know how to get around it. i had hoped if i put the script tag in the mainpage it would scope itself outside the iframe, i even tried moving the scope file to the head tag with no luck..
any suggestions?