I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is
You can use javascript to access the parent. You could echo out javascript in your PHP.. so your parent page has this:
function changeURL( url ) {
document.location = url;
}
and in your php 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.
The best and simplest thing to do is to use the form target element
<form action="..." target="_top">
<form action="..." target="_parent">
either of the target parameters works fine