Web Analytics Made Easy -
StatCounter Help with inserting java drop down menu into php page please - CodingForum

Announcement

Collapse
No announcement yet.

Help with inserting java drop down menu into php page please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with inserting java drop down menu into php page please

    I need help with putting a java drop down menu into a php page. The menu instructions call for me to insert certain lines of code into the <head> & <body> tags of the page. My problem is there is no real visible <body> tag in the page that I can see. There is a <bodyonload> tag however. I did try inserting the <body> tag right after the <bodyonload> tag with no results. I can clearly see the <head> tag for the php that I have so that's not really the problem I think. Its just the body I need to figure out how to make it all work together. I"VE tried many different ways of inserting it and get no menu at all when I test it. This is my php code for the <head> &<body> tags may be.

    PHP Code:
    class tpl_main {

    function 
    view_header($title$css$js$pmk_js$board_header) {
    global 
    $mklib$mklib_board;
    $css $mklib_board->import_css();
    return <<<EOF

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <!-- begin document head -->

    <head>
      <meta http-equiv="content-type" content="text/html; charset=
    {$mklib->charset}" />
      <meta name="generator" content="MKPortal" />
      <meta http-equiv="Pragma" content="no-cache" />
      <meta content="no-cache" http-equiv="no-cache" />
      <meta http-equiv="Cache-Control" content="no-cache" />
      
    {$title}
      
    {$css}
      
    {$board_header}
      <script type="text/javascript" src="
    {$js}"></script>
       
    {$pmk_js}
       
    </head>

    <body onload="javascript:GetPos()">

    <!-- end document head -->

    EOF;
    }

    function 
    open_main($mainwidth) {
    global 
    $mklib;
    return <<<EOF

    <!-- begin open main table --> 
    This is where I want the menu info to be inserted (or where I would like the menu to show up)

    PHP Code:
    <!-- begin linkbar -->

        <
    tr>
          <
    td>
            <
    table width="100%" align="center" cellspacing="0" cellpadding="2" border="0">
              <
    tr>
            <
    td class="navigatore" style="padding: 4px;">          
              
    $row_link&nbsp;          
            </
    td>
              </
    tr>
            </
    table>
          </
    td>
        </
    tr>
        
    <!-- 
    end linkbar --> 
    This is the java script that needs to go into the page.

    PHP Code:
    1Add the following code inside the <HEADsection of your page:

    <
    style>
    all.clsMenuItemNS, .clsMenuItemIE{text-decorationnonefontbold 9px Verdanacolor#CCCCCC; cursor: hand; z-index:100}
    #MainTable A:hover {color: red;}
    </style>

    <
    script language="JavaScript">

    //Top Nav Bar I v2.1- By Constantin Kuznetsov Jr.
    //Modified by Dynamic Drive for various improvements
    //Visit http://www.dynamicdrive.com for this script

    var keepstatic=//specify whether menu should stay static (works only in IE4+)
    var menucolor="#333333" //specify menu color
    var submenuwidth=150 //specify sub menus' width

    </script>


    2Copy and paste the below code into your webpageRIGHT AFTER the <bodytag (proceeding any other tags):

    <
    script language="JavaScript" src="menu.js"></script>
    <
    script language="JavaScript" src="menucontext.js"></script>
    <
    script language="JavaScript">
    showToolbar();
    </
    script>
    <
    script language="JavaScript">
    function 
    UpdateIt(){
    if (
    ie&&keepstatic&&!opr6)
    document.all["MainTable"].style.top document.body.scrollTop;
    setTimeout("UpdateIt()"200);
    }
    UpdateIt();
    </
    script
    Any help wopuld be great. TIA!

    MP
    Last edited by metalguy639; Oct 6, 2006, 03:06 AM.
    vBulletin Skins-N-Styles
    Webmaster Tutorials & Articles
Working...
X