I used jquery to show multiple child.aspx pages in different tabs in my parent.aspx page.
$('#tabcontent').append(
'<iframe width="100%" frameborder="0"
scrolling="no"
onload="adjustMyFrameHeight(' + count + ');"
id="c' + count + '" src="' + srcpage + '" >' + '</iframe>)
Now I want to call the Page_Unload method of all the child.aspx pages on parent Unload.
What I need is to store the information on each child.aspx page in the session and then reassign the session to each page.
try using innerHTML.They also only clear document.body (anything in the <head> is still present). Here is a solution that uses the DOM:
var frame = document.getElementById("myFrame"),
frameDoc = frame.contentDocument || frame.contentWindow.document;
frameDoc.removeChild(frameDoc.documentElement);
This solution uses innerHTML:
var frame = document.getElementById("myFrame"),
frameDoc = frame.contentDocument || frame.contentWindow.document;
frameDoc.documentElement.innerHTML = "";
replace myFrame by id of that frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With