www.webdeveloper.com
Results 1 to 5 of 5

Thread: javascript, frames and reload

  1. #1
    Join Date
    Jun 2005
    Location
    Finland
    Posts
    5

    javascript, frames and reload

    hi
    I have pages that has 3 frames(top,left,right)
    when page is loaded top frame has logo, left frame has navigation page
    and right frame has welcome page.

    left frame contains image map and javascript menu. All links are opened in right frame.

    here is the problem. when any link is opened in right frame, javascript menu stops working. i can make it work again if page that opened has following in onload.

    window.parent.location.reload();

    problem with this is that it will also replace just opened page with welcome page.

    so my question is How can i use that reload but keep just opened page.
    or where should i start searching problem with that menu.

  2. #2
    Join Date
    Jan 2005
    Location
    Los Angeles, CA
    Posts
    4,887
    You are going about this wrong, there is no reason why you can't fix your javascript menu.

    Do you have a testing page that we can look at so we can write you up some specific code to fix it?

  3. #3
    Join Date
    Jun 2005
    Location
    Finland
    Posts
    5
    Nope , i'm doing webpages for friend. And only his old pages are on net.

    I'm jusing hvmenu that I found on net. it easy and simple.
    http://www.dynamicdrive.com/dynamicindex1/hvmenu/

    here is main page code

    <FRAMESET rows="127,*" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
    <FRAME name="top" src="logo.htm" SCROLLING="no" noresize marginheight="0" marginwidth="0">
    <FRAMESET cols="265,*">
    <FRAME name="left" src="navi2.htm" SCROLLING="no" noresize marginheight="0" marginwidth="0">
    <FRAME name="right" src="yritys.htm" SCROLLING="no">
    </FRAMESET>
    </HEAD>
    <BODY text=black vLink=black aLink=black bgColor=white SIZE="1" FACE="Verdana" >

    here is navi2.htm

    <BODY bgColor=white>
    <script type='text/javascript'>
    function Go(){return}

    </script>
    <script type='text/javascript' src='exmplmenu_var.js'></script>
    <script type='text/javascript' src='menu_com.js'></script>
    <noscript>Your browser does not support script</noscript>


    <MAP Name="navimap">
    <AREA Href="yritys.htm" Shape="rect" Coords="0,22,142,44" target="sivu" >
    <AREA Href="Edustukset.htm" Shape="rect" Coords="0,54,142,76" target="sivu" >
    <AREA Href="yhteystiedot.htm" Shape="rect" Coords="0,85,142,109" target="sivu">
    </MAP>
    <IMG Src="kuvat\menumap.gif" Usemap="#navimap" ALIGN=RIGHT Width="142" Height="244" Ismap>


    here is part one of pages that will be loaded from link

    <script type='text/javascript'>
    function lataus()
    {
    window.frames['navi'].location.reload()


    }
    </script>
    </HEAD>

    <BODY onLoad="()">



    rest of pages are pure HTML
    js files of hv-menu are same, only frame configuration has been changed.

  4. #4
    Join Date
    Jan 2005
    Location
    Los Angeles, CA
    Posts
    4,887
    Change:
    <AREA ... target="sivu">
    To:
    <AREA ... target="right">

  5. #5
    Join Date
    Jun 2005
    Location
    Finland
    Posts
    5
    ahhh fixed that...

    but still no better.

    javascript still stops working when link is opened in right frame or if I use reload script, then page that is opened in right frame will be replaced with wellcome page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles