Help with javascript menu bar in IE and Opera


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help with javascript menu bar in IE and Opera

  1. #1
    Join Date
    Nov 2005
    Posts
    1

    Help with javascript menu bar in IE and Opera

    I am using php to link to a menu.html file that includes my navigation menu with javascript rollovers. It shows up fine in Safari and Firefox, but not at all in IE and Opera. Here are the codes:

    PHP:

    <!--Menu -->

    <div class="menu">
    <?php require("http://www.daltonridenhour.com/php/menu.html"); ?>
    </div>

    CSS:

    .menu {
    position: absolute;
    top: 500px;
    left: 170px;
    }
    .menu a:link {
    color: #FFFFFF;
    }
    .menu a:visited {
    color: #FFFFFF;
    }

    HTML file linked to by PHP:

    <a href="index.php3"
    onmouseover="document.home.src='/images/home-over.jpg'"
    onmouseout="document.home.src='/images/home.jpg'"
    <img src="/images/home.jpg" alt="home" name="home" width="50" height="22" /></a>
    <a href="bio.php3"
    onmouseover="document.bio.src='/images/bio-over.jpg'"
    onmouseout="document.bio.src='/images/bio.jpg'"
    <img src="/images/bio.jpg" alt="bio" name="bio" width="36" height="22" /></a>
    <a href="events.php3"
    onmouseover="document.events.src='/images/events-over.jpg'"
    onmouseout="document.events.src='/images/events.jpg'"
    <img src="/images/events.jpg" alt="events" name="events" width="61" height="22" /></a>
    <a href="media.php3"
    onmouseover="document.media.src='/images/media-over.jpg'"
    onmouseout="document.media.src='/images/media.jpg'"
    <img src="/images/media.jpg" alt="media" name="media" width="52" height="22" /></a>
    <a href="gallery.php3"
    onmouseover="document.gallery.src='/images/gallery-over.jpg'"
    onmouseout="document.gallery.src='/images/gallery.jpg'"
    <img src="/images/gallery.jpg" alt="gallery" name="gallery" width="59" height="22" /></a>
    <a href="links.php3"
    onmouseover="document.linkstry.src='/images/linkstry-over.jpg'"
    onmouseout="document.linkstry.src='/images/linkstry.jpg'"
    <img src="/images/linkstry.jpg" alt="links" name="linkstry" width="47" height="22" /></a>
    <a href="contact.php3"
    onmouseover="document.contact.src='/images/contact-over.jpg'"
    onmouseout="document.contact.src='/images/contact.jpg'"
    <img src="/images/contact.jpg" alt="contact" name="contact" width="66" height="22" /></a>

    Any reason why this would work in Safari and Firefox, but not in Opera and IE? Thanks a lot for your help.

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    255
    You should be asking this question in a JavaScript forum. Java is not the same as JavaScript.
    Happiness is good health and a bad memory.

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center