WordPress.org

Ready to get started?Download WordPress

Forums

Help with Javascript drop down menu in header (2 posts)

  1. myrajoi
    Member
    Posted 5 years ago #

    Hi there. I have dutifully searched the web, and this site to try to find a solution to my issue but I have not had any luck.

    That being said, I have a project where an html site was built with javascript menus that include a dropdown script. My function was to skin the WordPress blog to match the site. I had no issues completing that part of the assignment. On the other hand, I thought adding the drop down menu would be as easy as putting it in the header.php file and referencing the script in the head of the file.

    This is not the case.

    I found solutions on the web as well as here, but I am wondering if I can use the existing script or if it needs to be changed to a more compatible script to work with php.

    Here is the code for the menu:

    <div id="dropdown1" onmouseover="MM_showHideLayers('dropdown1','','show')" onmouseout="MM_showHideLayers('dropdown1','','hide','dropdown2','','hide')">
    <a href="service-parts-sales.html" class="dropdownmenu">» Service Parts Sales</a>
    	<a href="#" class="dropdownmenu" onmouseover="MM_showHideLayers('dropdown1','','show','dropdown2','','show')" onmouseout="MM_showHideLayers('dropdown2','','hide')">
    	» Trade-In Program</a>
    <a href="asset-recovery.html" class="dropdownmenu">» Asset Recovery</a> <a href="eco-free-network.html" class="dropdownmenu">» ecoFree Network</a> </div>
        <div id="dropdown2" onmouseover="MM_showHideLayers('dropdown1','','show','dropdown2','','show')" onmouseout="MM_showHideLayers('dropdown1','','hide','dropdown2','','hide')"> <a href="for-retailers.html" class="dropdownmenu">» For Retailers</a>
    <a href="for-consumers.html" class="dropdownmenu">» For Consumers</a> </div>
        <div id="dropdown3" onmouseover="MM_showHideLayers('dropdown3','','show')" onmouseout="MM_showHideLayers('dropdown3','','hide')"> <a href="corporate-bio.html" class="dropdownmenu">» Corporate Bio</a>
    <a href="executive-bio.html" class="dropdownmenu">» Executive Bio</a> </div>
        <div id="rss_feed"> <a href="#">rss feed</a> </div>
        <div id="top_navigation"> <a href="index.html">Home</a> <a href="about-us.html" class="act" onmouseover="MM_showHideLayers('dropdown1','','hide','dropdown2','','hide','dropdown3','','show')" onmouseout="MM_showHideLayers('dropdown1','','hide','dropdown2','','hide','dropdown3','','hide')">About Us</a>
    <a href="contact-us.html">Contact Us</a> <a href="#" onmouseover="MM_showHideLayers('dropdown1','','show','dropdown2','','hide')" onmouseout="MM_showHideLayers('dropdown1','','hide','dropdown2','','hide')">Services</a> <a href="news.html">News</a>
    <a href="employment.html">Employment</a> <a href="http://mycare.greensight.com/" target="_blank" >C.A.R.E.</a><a href="http://store.greensight.com/" target="_blank" class="no_seprator">WebStore</a></div>

    The main navigation shows up just fine. the drop downs do not. I have a feeling that my script is not called correctly in the header.php file, but I am new to php and not sure how to properly integrate javascript within it.

    This is my head script code:

    <script src="<?php bloginfo('url'); ?>/wp-content/themes/greensight/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <script type="text/javascript" src="<?php bloginfo('url'); ?>/wp-content/themes/greensight/Scripts/js/dropdown.js"></script>

    The site is located at: http://reagan.pickint.net/~admin313/blog/

    The html pages are correct: http://reagan.pickint.net/~admin313/news.html

    I would really like to know if I can use the menu AS IS or if I need to recreate the menus like I have found some good tutorials for. Any help is appreciated, I am so stuck right now.

    THANK YOU

  2. myrajoi
    Member
    Posted 5 years ago #

    bump ::: help?

Topic Closed

This topic has been closed to new replies.

About this Topic