Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

JS MENU rather than DHTML - what/where to edit.


fiscus

Recommended Posts

I have a new shop that I am putting together. I have made my shoped a 750 center variety rather than having the full width.

 

Some of the DHTML menus don;t work on centered shops as the DHTML can't be embedded within the categories box - therefore it doesn't work well for centered shops.

 

I just want to have something alittle more fancy than the default layout - but only want to have a mouseover cell highlight for each entry - simple, looks good and has high browsers compatibility.

 

Basically all I want it what you see on the index of these forums - each time you mouse runs over a different cell it displays it in a highlighted colour.

 

I have had a look in categories.php but there doesn;t seem to be much HTML in there - just looks like it is parsing stuff in from MYSQL.

 

Can anyone help me put the HTML in there while still keeping the same content - just want to have each item in a diff cell so each will highlight.

 

I had a quick look at this fourms source and it is something like this :

 

<td class="row1" width="100%" height="50" onMouseOver="this.style.backgroundColor='#FAFAFA'; this.style.cursor='hand';" onMouseOut=this.style.backgroundColor="#EFEFEF" onclick="window.location.href='viewforum.php?f=17'"> <span class="forumlink"> <a href="viewforum.php?f=17" class="forumlink">News and Announcements</a>

 

SO I assume I could use something similar to that.

 

Any help would be appreciated.

Link to comment
Share on other sites

Thanks...I had a look at your site, and while I don't want actual graphics in there I'm sure with your information I can substitute them for what I want.

 

If you can post the code that would be great!

Link to comment
Share on other sites

This is all in my column_left.php file.

 

<script language="JavaScript" type="text/JavaScript">

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_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_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>

 

Then for my actual images I have this code:

<tr>                

         <td><a href="<?php echo tep_href_link(FILENAME_GARDEN_BOXES, '', 'NONSSL'); ?>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','images1/b10r.jpg',1)"><img src="images1/b10.jpg" name="Image13" width="192" height="18" border="0"></a></td>

                        </tr>

 

I hope this helps.

Link to comment
Share on other sites

Is there no change in the categories.php?

 

I thought there would be changes in that as the column_lef.php only has details on what should be included in that column.

Link to comment
Share on other sites

You may be able to do it in categories.php, but I am not sure. Rather than using an infobox for my categories, I used the images and then defined the links to my products in application_top.php.

 

You might be able to put that in /catalog/includes/boxes/categories.php and tweak everything it is you desire to happen. But that is just a guess.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...