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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2003
    Location
    florida
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript menu won't display in frameset

    I am redesigning an HTML site to emulate the Flash version of the same site. http://www.cltmeetings.com if you want to see the Flash version.
    I'm using a javascript-generated menu to emulate the menus on the 'services' page. The javascript version works perfectly in a basic HTML page. However, when the same HTML page is loaded into a frameset, the javascript menu does not appear unless I hit the F5 key to refresh.
    I have tried using a refresh meta tag as well as a javascript refresh code, but these don't work. Only manually pressing F5 on my keyboard will make the menu appear.

    Is there a way to emulate the F5 keystroke in javascript?

    Or is there an alternative solution to make the javascript menu display in a frameset?

    *this is the script directly following the <body> tag, which calls the javascript to generate the menu:

    <script type='text/javascript'>
    //HV Menu- by Ger Versluis
    //Submitted to Dynamic Drive.com
    //Visit dynamicdrive.com for this script and more

    function Go(){return}</script>
    <script type='text/javascript' src='exmplmenu_var.js'></script>
    <script type='text/javascript' src='menu_com.js'></script>

    *then this script positions the menu on the page:

    <div id='MenuPos' style='position:relative; width:60; height:60;'><img src='images/transparent.gif' width='60' height='60'></div>

    Any ideas would be greatly appreciated.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    is there any <body onload="somefunction()">
    or in script someting like

    window.onload = somefunction;

    ?

    the menu has to be inserted in the chosen page (left.html, menu.html, whichever is that page) but not in the frameset, I mean not in the index.html
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    Oct 2003
    Location
    florida
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is there any <body onload="somefunction()">,window.onLoad?


    No, because I'm not sure what kind of function I need here.

    I guess I would need the browser to check if the javascript menu is loaded, and if not, to refresh the page (and check again?). That's basically the function in plain English, but I don't know how to code this.

    By they way, yes, the menu is inserted in the chosen page (serviceList.thm) and not in the frameset that holds the page.

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    There must be, for sure, an onload event.... Any kind of this type of menu must have a onload event which set up the objects... can you give us the script? Or a link to that page?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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