We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20096
    • 12 Posts
    Howdy modx folks. I’m a graphic designer venturing into the world of web design, and i’ve been thrilled with modx for the last couple of projects I’ve been working on. Some difficulty, though. Whilst migrating a non-modx page into modx, I had a page full of rollover images. My testing server, MAMP, displayed these just fine, but after uploading it all online, everything works but these rollovers. I can’t tell if it’s the javascript that’s not working or just the images. I’ve tried referencing the images all the way back to the root to no avail.

    the javascript was orginally generated in dreamweaver.
    the problem occurs in all browsers.
    mysql v. 5.1.41
    Apache v. 2.2
    php v. 5.2.11


    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>the Nine</title>
    <link href="assets/css/theninestylesheet.css" rel="stylesheet" type="text/css" />
    <link rel="Shortcut Icon" href="assets/Images/favicon.ico" />
    
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <style type="text/css">
    <!--
    a:link {
    	text-decoration: none;
    }
    a:visited {
    	text-decoration: none;
    }
    a:hover {
    	text-decoration: none;
    }
    a:active {
    	text-decoration: none;
    }
    -->
    </style></head>
    
    <body onload="MM_preloadImages('/assets/Images/2-RadioSilence.png','/assets/Images/4-Ping-Pong.png','/assets/Images/4-Thegasheart.png','/assets/Images/5-BlueGrass.png','/assets/Images/6-CaesarAntichrist.png','/assets/Images/7-RomeoandJuliet.png','/assets/Images/8-ThePerformers.png','/assets/Images/9-consent.png','/assets/Images/SubUrbia-Button.png')">
        
    <div class="body">
      <div class="top">
      	<div class="showtitle">    </div>
        <div class="maintitle">
       	  <div class="button1"><a href="index.php?id=3#suburbia" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Play1','','/assets/Images/SubUrbia-Button.png',1)"><img src="/assets/Images/1-Number-Buttons.png" name="Play1" width="115" height="113" border="0" id="Play1" /></a></div>
          <div class="button5"><a href="index.php?id=3#bluegrass" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('play5','','/assets/Images/5-BlueGrass.png',1)"><img src="/assets/Images/5-Number-Buttons.png" name="play5" width="115" height="113" border="0" id="play5" /></a></div>
        </div>
      </div>
      
      <div class="middle">
        <div class="centerbutton" id="button2"><a href="index.php?id=3#radiosilence" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Play2','','/assets/Images/2-RadioSilence.png',1)"><img src="/assets/Images/2-Number-Buttons.png" name="Play2" width="115" height="113" border="0" id="Play2" /></a></div>
        
        <div class="centerbutton" id="button6"><a href="index.php?id=3#caesarantichrist" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('play6','','/assets/Images/6-CaesarAntichrist.png',1)"><img src="/assets/Images/6-Number-Buttons.png" name="play6" width="115" height="113" border="0" id="play6" /></a></div>
        
        <div class="centerbutton" id="button9"><a href="index.php?id=3#consent" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Play9','','/assets/Images/9-consent.png',1)"><img src="/assets/Images/9-Number-Buttons.png" name="Play9" width="115" height="113" border="0" id="Play9" /></a></div>
        
        <div class="centerbutton" id="buttond"><a href="index.php?id=3#theperformers" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('play8','','/assets/Images/8-ThePerformers.png',1)"><img src="/assets/Images/8-Number-Buttons.png" name="play8" width="115" height="113" border="0" id="play8" /></a></div>
        
        
        <div class="centerbutton" id="button4"><a href="index.php?id=3#thegasheart" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('play4','','/assets/Images/4-Thegasheart.png',1)"><img src="/assets/Images/4-Number-Button.png" name="play4" width="115" height="113" border="0" id="play4" /></a></div>
      </div>  
      <div class="bottomcross">
        <div id="lowrightmenu">
          <div class="navbuttonposition" id="navcontainer">
            <span id="navlist">
             [[Wayfinder? &startId=`0` &level=`1`]]
    <ul padding="none" margin="none"><li padding="0px" margin="0px"><a href="http://theninechicago.blogspot.com" target="_blank">Blog</a></li></ul>
            </span>
          </div>
        </div>
        
        <div id="bottomtwocrossbuttons">
          <div class="button7style" id="button7"><a href="index.php?id=3#romeoandjuliet" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('play7','','/assets/Images/7-RomeoandJuliet.png',1)"><img src="/assets/Images/7-Number-Buttons.png" name="play7" width="115" height="113" border="0" id="play7" /></a></div>
          <div class="button7style" id="button3"><a href="index.php?id=3#pingpong" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Play3','','/assets/Images/4-Ping-Pong.png',1)"><img src="/assets/Images/3-Number-Buttons.png" name="Play3" width="115" height="113" border="0" id="Play3" /></a></div>
        </div>
      </div>
    </div>
    </body>
    </html>


    the site where the issue is occuring is http://theninechicago.com

    Thanks in advance
    -Mike
      • 4310
      • 2,310 Posts
      Try adding this to your <head> in the template :
      <base href="[(site_url)]"></base>

      Also remove the leading slash from /assets/Images/whatever.png
        • 20096
        • 12 Posts
        oy. added the code and removed the slashes. no such luck. anything else to try?
          • 4310
          • 2,310 Posts
          assets/Images/4-Ping-Pong.png
          De-capitalise Images it works laugh
            • 20096
            • 12 Posts
            It sure does!!!
            Thank you thank you thank you. There’s one silly lesson I’ll never have to learn again.
            A thousand smiling goldfish on you and your family.
              • 4310
              • 2,310 Posts
              Mmm, never seen a goldfish smile, maybe I’ve only seen sad ones laugh