Hi Friends,

I have written one HTML page in which i have on button with window.open function. so it opens in new tab. but i want it to open in it frame in that HTML page.

Is it possible any how ? Or is there other way ?

**Thanks**
<script type='text/javascript'><!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(layer) {
if (dom) {document.getElementById(layer).style.visibility='hidden';}
if (document.layers) {document.layers[layer].visibility='hide';} }
function showIt(layer) {
if (dom) {document.getElementById(layer).style.visibility='visible';}
if (document.layers) {document.layers[layer].visibility='show';} }
--></script>
<div id="layer1" style="position:fixed; width:50%; bottom:0;top:auto;z-index:30; 
left:0; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid;">
<b>text</b>:<br> Text Text Text Text Text Text Text Text Text Text Text Text Text
<UL>
<li> Text Text Text Text Text Text Text Text Text Text Text Text Text
<li> Text Text Text Text Text Text Text Text Text Text Text Text Text
<li> Text Text Text Text Text Text Text Text Text Text Text Text Text
<li> Text Text Text Text Text Text Text Text Text Text Text Text Text
<li> Text Text Text Text Text Text Text Text Text Text Text Text Text
<li> Text Text Text Text Text Text Text Text Text Text Text Text Text
</ul>
<button id="form" onClick="hideIt('layer1');">Close</button></div>
<button id="form" onClick="showIt('layer1');" >show Important Information</button>

Hi, try this:

<a href="Javascript:Void(0)" onclick="Javascript:FrameRedirect();">CHANGE FRAME CONTENT</a>
<script type="text/javascript">
function FrameRedirect(){
    window.opener.top.frames.top.location.href='URL';
}
</script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.