I have a frameset and 2 frames.
What I want to achieve is: A user clicks on an image/button. This opens a page in another frame. I can then call a function within that page.
Below is the sample code:
Main_File.html
<head>
<frameset row="53px,*">
<frame src="menuPage.html">
<frame src="homePage.html" id="MainWindow">
</frameset>
</head>
menuPage.html
<html>
<script>
function ShowFunc()
{
top.MainWindow.location='homePage.html';
top.MainWindow.Show()
}
</script>
<body>
<img src="abc.jpg" onclick="ShowFunc()">
</body>
homePage.html
<html>
<script>
function Show()
{
document.getElementById('hiddenDiv').style.display='block';
}
</script>
<style>
#hiddenDiv
{
height:100px;
width:100px;
position:absolute;
top:10px;
left:10px;
display:none;
}
</style>
<body>
<div id="hiddenDiv">
Some Text
</div>
</body>
This is just a sample code.
What basically I want is, on load of frame2/homePage.html
hiddenDiv should not be visible.
But when I click on the image present in frame1
then that div should become visible.
Any Suggestion?