maciek4
08-01-2006, 12:19 PM
I bought a template from template monster that has a built in html and javascript code. I am trying to modify it to create my own website.
The site has a flash banner at the top and the rest is in html. The site has 5 web pages and the javascript code allows you to visit those pages while still in index.html
function load_content () {
if (parent.document.getElementById('main_div')) {
parent.document.getElementById('main_div').innerHTML=document.getElementById('inner_frame').innerHTM L;
}
if (!parent.document.getElementById('main_div')) {
window.location=('index.html') ;
}
}
<body onload="load_content()">
<div id="inner_frame">
The problem arises when I try to create my own page. I am not familiar with javascript so I dont know how to change it to fix it. When I enter my page and click on any of the links in the banner I go directly to the main page, no matter which link I click on. How do I fix it?
The site has a flash banner at the top and the rest is in html. The site has 5 web pages and the javascript code allows you to visit those pages while still in index.html
function load_content () {
if (parent.document.getElementById('main_div')) {
parent.document.getElementById('main_div').innerHTML=document.getElementById('inner_frame').innerHTM L;
}
if (!parent.document.getElementById('main_div')) {
window.location=('index.html') ;
}
}
<body onload="load_content()">
<div id="inner_frame">
The problem arises when I try to create my own page. I am not familiar with javascript so I dont know how to change it to fix it. When I enter my page and click on any of the links in the banner I go directly to the main page, no matter which link I click on. How do I fix it?