1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    I have a page set with images for links and onmouseover to change the image when the mouse is over it (of course). The problem is, when the page loads, none of the images load. When I put the mouse over where one goes, I get the onmouse image, when I move the mouse, I get the offmouse image that should have come up when the page loaded.

    It does this in Netscape and in Explorer.

    The images are set to preload so I can't figure out what the problem could be.


  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    Sounds at first like you haven´t put the images into the HTML part of the page, but since you can do an imagechange the should at least be a name-reference in HTML. Could you copy the mouseover parts of your code here or provide the url, so i can have a look?

    take care
  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    I don't understand why it won't work, especially considering it worked for a day and I don't recall making any changes.



    <script language="JavaScript">

    if (document.images) {
    image1on = new Image();
    image1on.src = "tabs/tab1_1.gif";

    image2on = new Image();
    image2on.src = "tabs/tab2_2.gif";

    image3on = new Image();
    image3on.src = "tabs/tab3_3.gif";

    image4on = new Image();
    image4on.src = "tabs/tab4_4.gif";

    image5on = new Image();
    image5on.src = "tabs/tab5_5.gif";

    image1off = new Image();
    image1off.src = "tabs/tab1.gif";

    image2off = new Image();
    image2off.src = "tabs/tab2.gif";

    image3off = new Image();
    image3off.src = "tabs/tab3.gif";

    image4off = new Image();
    image4off.src = "tabs/tab4.gif";

    image5off = new Image();
    image5off.src = "tabs/tab5.gif";


    function changeImages() {
    if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
    document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");

    // -->



    <center><table border=0 cellpadding=0 cellspacing=0 width=600>
    <td align=middle colspan=5><h3><IMG src="picture.jpg" border="0"></td>

    <td><A href="doc1.asp" onMouseOver="changeImages('image1', 'image1on')" onMouseOut="changeImages('image1', 'image1off')"><img name="image1" src="tab1.gif" alt="Documents" border=0 width="100" height="23"></a></td>

    <td><A href="poc.asp" onMouseOver="changeImages('image2', 'image2on')" onMouseOut="changeImages('image2', 'image2off')"><img name="image2" src="tab2.gif" alt="POC List" border=0 width="100" height="23"></a></td>

    <td><A href="panel.asp" onMouseOver="changeImages('image3', 'image3on')" onMouseOut="changeImages('image3', 'image3off')"><img name="image3" src="tab3.gif" alt="Panel" border=0 width="200" height="23"></a></td>

    <td><A href="cal/default.asp" onMouseOver="changeImages('image4', 'image4on')" onMouseOut="changeImages('image4', 'image4off')"><img name="image4" src="tab4.gif" alt="Calendar" border=0 width="100" height="23"></a></td>

    <td><A href="hist.asp" onMouseOver="changeImages('image5', 'image5on')" onMouseOut="changeImages('image5', 'image5off')"><img name="image5" src="tab5.gif" alt="History" border=0 width="100" height="23"></a></td>



  6. #4
  7. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    Hi there!

    I think whats wrong is, that you forgot to
    put the right path for the image source
    into the image tag.
    maybe i´m wrong(since i don´t know your
    directory structure), but it seems that it
    should be:
    <img name="image2" src="tabs/tab2.gif" alt="POC List" border=0 width="100" height="23">

    I hope that´s it
  8. #5
  9. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    Thanks. If you saw what some of my code looks like, you would understand how a slip like that could happen (the above is one of my cleaner sets of code).

    Thanx again,

Similar Threads

  1. rollover and swap images w/ same onMouseOver
    By cresquin in forum HTML Programming
    Replies: 1
    Last Post: January 2nd, 2004, 03:41 AM
  2. Image uploading butchering images
    By pablo.gosse in forum PHP Development
    Replies: 6
    Last Post: October 19th, 2003, 09:12 PM
  3. Replies: 2
    Last Post: September 26th, 2003, 09:40 AM
  4. External javascript files and AOL??
    By true2u1 in forum JavaScript Development
    Replies: 7
    Last Post: December 6th, 2001, 08:56 AM
  5. Change mutipple images onMouseover
    By johan13 in forum HTML Programming
    Replies: 1
    Last Post: February 15th, 2001, 02:28 PM

IMN logo majestic logo threadwatch logo seochat tools logo