PDA

View Full Version : Using Anchors in Popup


djfenom
09-06-2002, 10:46 AM
I'm currently using this code to do my popups:

<script language="javascript">
<!--
var win1 = new Object;
function pop(page,top,left,width,height,resize,scroll,fullscreen){
closepop();
win1 = eval("window.open('" + page + "','popup','top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",resizable=" + resize + ",scrollbars=" + scroll + "');")
}
function closepop(){
if (win1.closed == false)
{win1.close();}
}

//-->
</script>


<a href="javascript:window.parent.pop('popup.html#lite','15','15','488','440','no','yes');">

However I've now come across a problem, I've got a popup that is a frameset and I need to use anchors referenced from the page where you click for the popup. The frameset has 3 frames and I need to use the anchors in the middle frame. So when you click on the link for the popup, it goes to #anchor in the middle frame of the popup.

Thanks in advance.

Chris

beetle
09-06-2002, 03:54 PM
Download this

www.peterbailey.net/js/superframes.js

Study that and get it working, but use an anchored link for the parameter i.e. page.htm#anchor1

djfenom
09-09-2002, 08:46 AM
I'm still looking for a solution for this, I can use a different piece of code if necessary.

Hope someone can help.

Thanks

Chris

A1ien51
09-09-2002, 05:05 PM
you probably will have to add more code.

basic idea would be this:

WindowName.parent.FrameName.window.location.href="location#yep";

that should do the trick