I bought a template from templatemonster. It has a flash banner and pages in html. When I added the mail form I changed one of the files from i_frame5.html to i_frame5.php and when I click on submit it automatically redirects me to the main page instead of showing the text message "thank you for submitting the form".
I don't know javascript, is it possible that this is causing it to go back to main page when submit is clicked?
<script language="JavaScript" type="text/JavaScript">
function load_content () {
if (parent.document.getElementById('main_div')) {
parent.document.getElementById('main_div').innerHTML=document.getElementById('inner_frame').innerHTML;
}
if (!parent.document.getElementById('main_div')) {
window.location=('index.html') ;
}
}
</script>
then there is
<body onload="load_content()">
<div id="inner_frame">