View Full Version : How to: reference new_window->frame->marker

01-31-2003, 05:44 PM
From a parent window I'm opening an on-line help page in a separate window. Currently the OL help document has no frames. Currently the OL help opens to a specific HTML marker (<a name="markername">) imbedded in the text. Currently this all works just fine.

Now I want to add frames to the OL Help page. So when the user clicks "help" I need to reference the #markername that is now in a frame. How do I do that from the "window.open()" function?

Here's our current call:

var helpContext = 'a_marker_reference"
. . .

helpWin = window.open('scHelp.asp#<%=helpContext%>', 'open_window',. . .);

Here is part of my new scHelp.asp page shell

<frameset cols="145,*" framespacing='0' frameborder='0' border='0'>
<frame . . . src="scHelpNavigation.asp" name="navig" . . .>
<frame . . . src="scHelpFrames.asp" name="OLHelpText" . . .>

The marker I'm trying to reference will be in the "OLHelpText" frame.

The URL I pass in the window.open (the 1st parameter) is where I think I need to make the frame reference.

Here's a WAG* at what I need:

newWin = window.open('scHelp.asp.OLHelpText#<%=helpContext%> . . .)

OR maybe this ?

newWin = window.open('scHelp.asp", . . .);

*Wild A(rse) Guess

01-31-2003, 05:57 PM
Since you are using ASP this is easy. No need to worry about trying to reference the frame, just dynamically write the marker url into the frameset document.

Pass the name of the anchor you want to your frameset page (scHelp.asp) on the querystring and then retrieve it and hard-code to the page so that the document loads at the right point. Like this:

helpWin = window.open('scHelp.asp?marker=<%=helpContext%>', 'open_window',. . .);

and then on scHelp.asp you would do something like this:

<frameset cols="145,*" framespacing='0' frameborder='0' border='0'>
<frame . . . src="scHelpNavigation.asp" name="navig" . . .>
<frame . . . src="scHelpFrames.asp#<%=Request.QueryString("marker")%>" name="OLHelpText" . . .>

01-31-2003, 09:21 PM

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum