Hi,
I am trying to simulate a detach frame mechanism.
I have 2 frames, mainFrame and leftFrame. I want to be able to let users open a new window with the location of the mainFrame.
I can simulate "detach frame" if the user has not clicked a link, but when the location of the frame is changed the js breaks.
Here is the code:
...
<script>
function detatch_mainframe () {
window.open(parent.mainFrame.location.href);
}
</script>
...
<a href="#" onclick="javascript:detatch_mainframe()">Detatch Frame</a>
...
Is there a work-around for this problem?
TIA
I am trying to simulate a detach frame mechanism.
I have 2 frames, mainFrame and leftFrame. I want to be able to let users open a new window with the location of the mainFrame.
I can simulate "detach frame" if the user has not clicked a link, but when the location of the frame is changed the js breaks.
Here is the code:
...
<script>
function detatch_mainframe () {
window.open(parent.mainFrame.location.href);
}
</script>
...
<a href="#" onclick="javascript:detatch_mainframe()">Detatch Frame</a>
...
Is there a work-around for this problem?
TIA