Hello everyone,
We have an HTML page which contains an Iframe where a specified HTML file will load. We would like to load a specific *.HTML into the Iframe based on a condition. This condition comes from a button pushed in our Flash movie and the variable is passed into Javascript.
In Javascript, here is the condition to load the main page (solutions.html):
if(linkobj==”somemovie1.flv”) {
location.href=”html/solutions/solutions.html”;
} else if (linkobj==”vid2.flv”) {
…
} else if (linkobj==”vid3.flv”) {
…
} else if (linkobj==”vid4.flv”) {
…
On the solutions.html page, our Iframe is defined as:
<iframe src=”page1.html” frameborder=”0″ name=”content” width=”850″ height=”410″ scrolling=”yes”></iframe>
I would like to have either page1.html, page2.html, page3.html load up based on a javascript condition.
I have so far tried:
window.main.frames[‘content’].location.replace(‘html/solutions/page1.html’);
document.write(“<iframe src=’html/solutions/page1.html’ frameborder=’0′ name=’content’ width=’850′ height=’410′ scrolling=’yes’>”);
Appreciate the help, and thank you in advance for your time.