Well, adding a mouse over function in that code is relatively easy, I have taken your code as you supplied it (not what I asked for, BTW), turned it into a function and added a call to that function from the DD code you quoted (it is not 'my code', I am not working for DD):
Code:
function mOver1(){MM_swapImage('image_big','','<%=rs_pics("medium_media_file_name")%>',1);MM_setTextOfTextfield('txt_itemdescription','','<%=rs_pics("product_name")%><% Response.write rs_pics("product_short_description")%>Price:<%=(rs_pics("product_price"))%>Catalogue No : <%=rs_pics("catalog_id")%>No Delivery Charge with this item!');MM_setTextOfTextfield('txt_productid','','<%=rs_pics("product_id")%>')" onClick="MM_swapImage('image_big','','<%=rs_pics("menufile")%>',1);">
<img name="<%=rs_pics("menufile")%>" border="0" src="<%=rs_pics("menufile")%>"}
function buildimage(i){
var tempcontainer=galleryarray[i][3]!=""? '<a href="'+galleryarray[i][3]+'" target="'+href_target+'">' : ""
tempcontainer+='<img src="'+galleryarray[i][0]+'" onmouseover="mOver1();" border="1" title="'+galleryarray[i][1]+'">'
tempcontainer=galleryarray[i][3]!=""? tempcontainer+'</a>' : tempcontainer
tempcontainer=galleryarray[i][2]!=""? tempcontainer+'<br \/>'+galleryarray[i][2] : tempcontainer
return tempcontainer
}
You will notice the red highlighted part. That is one way to add any function to the DD code onmouseover. A neat trick may be used:
Code:
function buildimage(i){
var tempcontainer=galleryarray[i][3]!=""? '<a href="'+galleryarray[i][3]+'" target="'+href_target+'">' : ""
tempcontainer+='<img src="'+galleryarray[i][0]+'" onmouseover="mOver2(this, \''+i+'\');" border="1" title="'+galleryarray[i][1]+'">'
tempcontainer=galleryarray[i][3]!=""? tempcontainer+'</a>' : tempcontainer
tempcontainer=galleryarray[i][2]!=""? tempcontainer+'<br \/>'+galleryarray[i][2] : tempcontainer
return tempcontainer
}
Here the function mOver2(el, num) would receive two parameters from each unique image the above code writes. The first parameter would be the element (as an object) that contains the image. The second parameter would be the unique number that identifies the image's source and other features (if any) in the primary galleryarray. What you do with them in the new mOver2(el, num) function is to to you but, as a simple demo try:
Code:
function mOver2(el, num){
alert ('Image source is '+el.src+'\nIt\'s number in the primary array is '+num+'\nOther values in the array, if any, are:\n '+galleryarray[num].toString().substr(galleryarray[num].toString().indexOf(galleryarray[num][0])+galleryarray[num][0].length+1))
}
Bookmarks