Recently I was attempting to create a frame of buttons created with jpeg images that could be used to invoke different pages into a main viewer frame. The problem was as a button was clicked and the page loaded the frame holding the buttons dissappeared as the new page was loaded.
The solution to this is shown below:
<a href "#" OnClick="parent.Page_Viewer.location='SDMC_Home.html'; self.location='SDMC_menu.html'" ><img src=".\SDMC_Assets\bHome.jpg" height=37 alt"" border="0"></a>
The important point I discovered is a matter of syntax and it is worth passing on.
The Onclick event must invoke two operations and to the unwary (like me) can prevent the second operation from being performed by incorrect positioning of the double quotes. see below
<a href "#" OnClick="parent.Page_Viewer.location='SDMC_Home.html'";"self.location='SDMC_menu.html'" ><img src=".\SDMC_Assets\bHome.jpg" height=37 alt"" border="0"></a>
Note the extra double quotes [bold] inserted separating each of the two actions needed to be performed. This will prevent the menu frame from being refreshed and thus it dissappears.
Of course this can go for all types of layouts not just menu frames where you wish one area to remain in view at all times.
Hope this helps other newbie's like me.
The solution to this is shown below:
<a href "#" OnClick="parent.Page_Viewer.location='SDMC_Home.html'; self.location='SDMC_menu.html'" ><img src=".\SDMC_Assets\bHome.jpg" height=37 alt"" border="0"></a>
The important point I discovered is a matter of syntax and it is worth passing on.
The Onclick event must invoke two operations and to the unwary (like me) can prevent the second operation from being performed by incorrect positioning of the double quotes. see below
<a href "#" OnClick="parent.Page_Viewer.location='SDMC_Home.html'";"self.location='SDMC_menu.html'" ><img src=".\SDMC_Assets\bHome.jpg" height=37 alt"" border="0"></a>
Note the extra double quotes [bold] inserted separating each of the two actions needed to be performed. This will prevent the menu frame from being refreshed and thus it dissappears.
Of course this can go for all types of layouts not just menu frames where you wish one area to remain in view at all times.
Hope this helps other newbie's like me.