Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Round Rock, Texas
    Posts
    443
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to: reference new_window->frame->marker

    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:
    Code:
    var helpContext = 'a_marker_reference"
    . . .
    
      helpWin = window.open('scHelp.asp#<%=helpContext%>', 'open_window',. . .); 
      helpWin.focus();
    Here is part of my new scHelp.asp page shell
    Code:
      <frameset cols="145,*" framespacing='0' frameborder='0' border='0'> 
        <frame . . . src="scHelpNavigation.asp" name="navig" . . .>
        <frame . . . src="scHelpFrames.asp" name="OLHelpText" . . .>
      </frameset>
    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:
    Code:
    newWin = window.open('scHelp.asp.OLHelpText#<%=helpContext%> . . .)
    helpWin.focus();
    OR maybe this ?
    Code:
    newWin = window.open('scHelp.asp", . . .);
    newWin.frames"OLHelpText#<%=helpContext%>".focus();

    *Wild A(rse) Guess

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    London & Oxford
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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" . . .>
    </frameset>
    As easy as 3.1415926535897932384626433832795028841

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Round Rock, Texas
    Posts
    443
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Works Great, Thanks



  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •