Setting top.someFrame.location...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hzgt9b

    Setting top.someFrame.location...

    Using VS2005, VB.NET and lots of javascript,
    I have a page with (gasp) frames on it. It has two frames a navigation
    pane and a "content" pane. The navigation pane runs a page that has
    lots of javascript in it. One of the scripts controls what is
    dispalyed in the content pane. I am using the following code to
    navigate the content pane to a url:

    top.content.loc ation=targetUrl ;

    This works great most of the time but sometimes I have trouble opening
    pages with relative paths. How can I specify a path (i.e. targetUrl)
    that always point to the same folder in my site?


    PS - Frames: I am stuck with them for now - would love to get rid them
    but I'm not in a position todo so right now - more discussion
    regarding them is moot point regarding this post :)

    Your thoughts appreciated.
  • SAM

    #2
    Re: Setting top.someFrame.l ocation...

    hzgt9b a écrit :
    Using VS2005, VB.NET and lots of javascript,
    I have a page with (gasp) frames on it. It has two frames a navigation
    pane and a "content" pane. The navigation pane runs a page that has
    lots of javascript in it. One of the scripts controls what is
    dispalyed in the content pane. I am using the following code to
    navigate the content pane to a url:
    >
    top.content.loc ation=targetUrl ;
    >
    This works great most of the time but sometimes I have trouble opening
    pages with relative paths. How can I specify a path (i.e. targetUrl)
    that always point to the same folder in my site?
    It is a simple html question ...

    In the head of the menu's page (very close to top) :

    <base href="mySite/myFolder/myPages/">

    or if you want to send all pages in the same frame

    <base href="mySite/myFolder/myPages/" target="content ">

    and your menu's links :

    <a href="p1.htm">p age 1</a>



    About your JavaScript :

    <a href="../../aPage.htm"
    onclick="top.co ntent.location= this.href;retur n false;">a page</a>


    --
    sm

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Setting top.someFrame.l ocation...

      hzgt9b wrote:
      Using VS2005, VB.NET
      Irrelevant.
      and lots of javascript, I have a page with (gasp) frames on it. It has
      two frames a navigation pane and a "content" pane. The navigation pane
      runs a page that has lots of javascript in it. One of the scripts
      controls what is dispalyed in the content pane. I am using the following
      code to navigate the content pane to a url:
      >
      top.content.loc ation=targetUrl ;
      Should be

      window.top.fram es["content"].location = targetUrl;
      This works great most of the time but sometimes I have trouble opening
      pages with relative paths. How can I specify a path (i.e. targetUrl) that
      always point to the same folder in my site?
      Parse error.
      [...] Your thoughts appreciated.
      You should take heed of the FAQ, especially the part about proper
      posting if you want to have any chance of helpful replies.




      PointedEars
      --
      realism: HTML 4.01 Strict
      evangelism: XHTML 1.0 Strict
      madness: XHTML 1.1 as application/xhtml+xml
      -- Bjoern Hoehrmann

      Comment

      Working...