iframe link to parrent

Link to the parent from inside an iFrame using JAVA

CodeFunctionName
What is this?

Public

Tested

Original Work


You can use javascript to access the parent. You could echo out javascript in your HTML using PHP or ASP.. so your parent page has this:
function changeURL( url ) {
document.location = url;
}


and in your child script, you echo
<script >
parent.changeURL('mypage2.html' );
</script >

The reason you can't call parent.document.location is because it's read only - you have to have a function available on the parent to do it.

Views 1,122

Downloads 415

CodeID
DB ID