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 14 of 14
  1. #1
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post

    Unhappy cross frames with js menu

    I am looking for a solution to allow me to cross frames with my existing code?

    I have a menu bar at the top of my asp page:

    <tr bordercolor="#AEBDE5">
    <td width="128" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.main.location.href='airbook.asp';" onmouseover="fadeImgend2(0)" onmouseout="fadeImg2(0)"><font face="verdana" color="#FFFFFF" size=2>Flights</font></td>
    <td width="128" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.main.location.href='bookings.asp';" onmouseover="fadeImgend2(1)" onmouseout="fadeImg2(1)"><font face="verdana" color="#FFFFFF" size=2>Bookings</font></td>
    <td width="128" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.main.location.href='admin_login_form.asp';" onmouseover="fadeImgend2(2)" onmouseout="fadeImg2(2)"><font face="verdana" color="#FFFFFF" size=2>Admin</font></td>
    <td width="129" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="return dropdownmenu(this, event, menu2, '200px');" onmouseover="fadeImgend2(3)" onmouseout="fadeImg2(3);delayhidemenu();" target="_parent"><font color="#FFFFFF" size="2" face="verdana">Help</font></td>
    <td width="129" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.location.href='logout.asp?logOut=true';" onmouseover="fadeImgend2(4)" onmouseout="fadeImg2(4)"><font face="verdana" color="#FFFFFF" size=2>Logout</font></td>
    </tr>

    My problem is when i click 'HELP' the javascript drop-down menu does not go into the next frame. it just cuts off.

    how do i stop this? is there a parameter? or is it a new piece of code required?

    Picco

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    well one possible solution would be rather than using a frameset is to make a page with ur menu at the top, then below it add an iframe where ur links pages would appear, its the same behavior as a frameset but the js menu can cross over the iframe

  • #3
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,501
    Thanks
    3
    Thanked 500 Times in 487 Posts
    have a look at

    http://www.vicsjavascripts.org.ok/Fr...ameSubMenu.htm

    let me know if you want to go further with this, I may be able to assist depending on work load

    or if you mount your frameset in an iframe you may be able to use the existing menu almost as is

    see
    http://www.vicsjavascripts.org.ok/HP/

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vwphillips
    if you mount your frameset in an iframe you may be able to use the existing menu almost as is
    except that IE5.0 and Opera 7+ can't place content above an iframe, and Safari can't handle events in the region of an element which goes over an iframe (the events "fall through" and are handled by the iframe element)

    I'd try to structure it as single pages, and avoid use of frames or iframes entirely.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post

    Unhappy

    <html>

    <head>
    <title>Mackenzie Consol - empowered by Volaro</title>

    </head>

    <frameset rows="70,*" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0">
    <frame name="navf" src="navframe.asp" SCROLLING="NO" MARGINWIDTH=0>
    <frame name="main" src="airbook.asp">
    <noframes>
    <body bgcolor="#ececec">
    <p>This page uses frames, but your browser doesn't support them.</p>
    </body>
    </noframes>
    </frameset>

    </html>

    This page above shows my existing setup. Two frames. Two pages navframe.asp and airbook.asp. What do i need to change to allow cross-frame menus? Do i have to replace navframe.asp or more?

    Picco

  • #6
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post

    Thumbs down

    [QUOTE=vwphillips]or if you mount your frameset in an iframe you may be able to use the existing menu almost as is
    QUOTE]

    how do i so this?

    heres my code:

    <html>

    <head>
    <title>Mackenzie Consol - empowered by Volaro</title>

    </head>

    <frameset rows="70,*" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0">
    <frame name="navf" src="navframe.asp" SCROLLING="NO" MARGINWIDTH=0>
    <frame name="main" src="airbook.asp">
    <noframes>
    <body bgcolor="#ececec">
    <p>This page uses frames, but your browser doesn't support them.</p>
    </body>
    </noframes>
    </frameset>

    </html>

  • #7
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,501
    Thanks
    3
    Thanked 500 Times in 487 Posts
    I hope you have taken note of brothercake comments
    and there are other ifs with this approach

    I will have a go if I can get your menu to work but I will need the complete code
    Last edited by vwphillips; 03-14-2005 at 04:52 PM.

  • #8
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post

    Unhappy

    heres my current pages:

    a.htm:

    _________

    <html>
    <head>
    <title>Mackenzie Consol - empowered by Volaro</title>
    </head>
    <frameset rows="70,*" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0">
    <frame name="navf" src="samples.html" SCROLLING="NO" MARGINWIDTH=0 style="z-index:inherit">
    <frame name="main" src="airbook.asp">
    <noframes>
    <body bgcolor="#ececec">
    <p>This page uses frames, but your browser doesn't support them.</p>
    </body>
    </noframes>
    </frameset>
    </html>
    ______________

    samples.html

    <script language="javascript" src="webmenu.js"></script>
    <script language="javascript" src="samples.js"></script>
    <link rel="stylesheet" href="samples.css">
    <script language="javascript">Main.Paint()</script>

    ___________________

    samples.js

    //--------------------------------------------------------------------------------------//
    // WebMenu Genie generated code - (c) 2003 Webport Data
    // Version 1.1.1
    // Generated: 03/14/05 04:45:25 PM
    //
    // Please register this program by visiting http://www.webportdata.com
    //--------------------------------------------------------------------------------------//

    // Debug
    window.onerror = ErrorHandler;
    function ErrorHandler(msg, url, lno) {alert(msg + " : " + lno);}

    wmPREFIX = "wm";
    wmFONT = "Arial";
    wmFONTSIZE = "12";
    wmFONTALIGN = "right";
    wmFORECOLOR = "#000000";
    wmFOREOVER = "#FFFFFF";
    wmFOREDOWN = "#FFFFFF";
    wmFOREDIS = "#000000";
    wmBACKCOLOR = "#D4D0C8";
    wmBACKOVER = "#004080";
    wmBACKDOWN = "#004080";
    wmBACKDIS = "#FFFFFF";
    wmMENUBACK = "#FFFFFF";
    wmBORDWIDTH = 1;
    wmCHECK = "images/check.gif";
    wmCHECKOVER = "images/checkover.gif";
    wmCHECKDOWN = "images/checkover.gif";
    wmCHECKWIDTH = 16;
    wmCHECKHEIGHT = 16;
    wmARROW = "images/arrow.gif";
    wmARROWOVER = "images/arrowover.gif";
    wmARROWDOWN = "images/arrowover.gif";
    wmARROWWIDTH = 9;
    wmARROWHEIGHT = 9;
    wmICON = "images/folder.gif";
    wmICONOVER = "images/folderopen.gif";
    wmICONDOWN = "images/folderopen.gif";
    wmICONWIDTH = 16;
    wmICONHEIGHT = 16;
    wmVTOPOFFSET = 7;
    wmVLEFTOFFSET = -5;
    wmHTOPOFFSET = 1;
    wmHLEFTOFFSET = 0;
    wmTRANSITION = wmNONE;
    wmTRANSSPEED = 0.50;
    wmCURSOR = "default";

    // Create Menu: Main
    Main = new wmMenu("Main", wmMAIN, 10, 10, 450, 1, wmTEXT);
    Main.cBorderClass = "wmBorder1";
    Main.cTextClass = "wmText2";
    Main.cFontAlign = "left";
    Main.lFontBold = true;
    Main.cBackColor = "#56ADD8";
    Main.cBackOver = "#54C6FC";
    Main.cBackDown = "#54C6FC";
    Main.cForeOver = "#000000";
    Main.cForeDown = "#000000";
    Main.cMenuBack = "#56ADD8";
    Main.nVTopOffset = 5;
    Main.lTransparent = true;
    I1 = Main.AddItem("I1", "FlightsA", "#000000", "#000000", "#000000", "#56ADD8", "#54C6FC", "#54C6FC");
    I1.cHref = "airbook.asp";
    I1.nWidth = 80;
    I1.nPicWidth = 70;
    I1.nPicHeight = 20;
    I2 = Main.AddItem("I2", "Bookings");
    I2.cHref = "bookings.asp";
    I2.nWidth = 100;
    I3 = Main.AddItem("I3", "Admin");
    I3.cHref = "admin_login_form.asp";
    I3.nWidth = 70;
    I4 = Main.AddItem("I4", "Help");
    I4.nWidth = 100;
    I5 = Main.AddItem("I5", "Logout");
    I5.cHref = "logout.asp?logOut=true";
    I5.nWidth = 70;

    // Create Menu: M4
    M4 = I4.AddMenu("M4", 0, 1);
    M4.cBorderClass = "wmBorder1";
    M4.cTextClass = "wmText2";
    M4.lFontBold = false;
    M4.cBackColor = "#F8EA9A";
    M4.cBackOver = "#004080";
    M4.cBackDown = "#004080";
    M4.cForeOver = "#FFFFFF";
    M4.cForeDown = "#FFFFFF";
    M4.cMenuBack = "#FFFFFF";
    M4.lArrowCol = true;
    M4.lTransparent = false;
    M4.nOpacity = 100;
    M4.nTransition = wmSCROLLDOWN;
    I4_1 = M4.AddItem("I4_1", "Registration", "#000000", "#FFFFFF", "#FFFFFF", "#F8EA9A", "#004080", "#004080");
    I4_1.cHref = "help.htm";
    I4_2 = M4.AddItem("I4_2", "Agency Setup");
    I4_2.cHref = "help.htm";
    I4_5 = M4.AddItem("I4_5", "Staff User Names");
    I4_5.cHref = "help.htm";
    //--------------------------------------------------------------------------------------//
    // End Webmenu Genie generated code
    //--------------------------------------------------------------------------------------//
    ________________________________________

    samples.css

    .wmBorder1 {
    border-width: 1px;
    border-style: solid;
    border-color: #000000;
    }
    .wmText2 {
    font-family: Arial;
    font-size: 12px;
    }

    ____________________________

    webmenu.js is massive!

    are you going to take a look?

  • #9
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,501
    Thanks
    3
    Thanked 500 Times in 487 Posts
    The Z Index of the menu Items needs to be controlled so I need the COMPLETE code to see if this is possible

  • #10
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post
    webmenu.js is too big to post

  • #11
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,501
    Thanks
    3
    Thanked 500 Times in 487 Posts
    post a link to the url

    ie MyURL/webmenu.js

    presume that the other js will be on the same link

  • #12
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post

  • #13
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,094
    Thanks
    15
    Thanked 1 Time in 1 Post
    *** Crossframe mode ***

    Paste following code into <head> tag of page with top menu

    <!-- Apycom DHTML Menu -->
    <noscript>Visit <a href=http://dhtml-menu.com/>dhtml-menu.com</a> for more info.</noscript>
    <script type="text/javascript" language="JavaScript1.2" src="yourdir/apymenu.js"></script>
    <script type="text/javascript" language="JavaScript1.2" src="yourdir/data.js"></script>
    <!-- (c) 2004, Apycom Software, www.apycom.com -->

    Be sure you have frameset "ID" and frame "NAME" properties in your frameset. Example:

    <frameset id="fset" rows="130,*">
    <frame id="frm1" name="frm1" src="topmenu.html">
    <frame id="frm2" name="frm2" src="content.html">
    </frameset>

    Then replace the standard apy_init(); function at the end of data.js file by the apy_initFrame function:

    apy_initFrame (framesetID, mainFrameInd, subFrameInd, orientation);

    Where:
    framesetID - id of <frameset> tag;
    mainFrameInd - number of top menu frame (frame where the top menu will be placed) >=0;
    subFrameInd - number of submenus' frame >=0;
    orientation - 0 - horizontal frame orientation; 1 - vertical frame orientation.

    Example, based on the previous frameset example:
    apy_initFrame ("fset", 0, 1, 0);

    That's all. Notice you DO NOT need to insert any additional code to pages in other frames!

  • #14
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,501
    Thanks
    3
    Thanked 500 Times in 487 Posts
    I am not downloading the menu generator

    you will need to give me a link to the webmenu.js file


  •  

    Posting Permissions

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