Click to See Complete Forum and Search --> : How i call my function?


cheito90210
09-18-2009, 01:44 PM
I have a function called MM_swapImage and I need to call this in onMouseOver event. This is the function:

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];}
}

How i can call this funcion with a resources of asp? I use globalization on the aspx page.
I try to call the function with the following line of code

<asp:Image runat="server" imageurl="<%$ Resources:topMenu_discover.imageurl %>" name="Image5" width="96" height="43" id="Image5" onMouseOver="MM_swapImage('Image5','','<%$ Resources:topMenu_discover_on.imageurl %>',1);" />

I want you to change the image on mouse over.
I use App_LocalResources (.resx file)
:confused::confused:

Blondsniper
09-18-2009, 02:00 PM
Hi I believe you can use the following code

onMouseOver="javaScript:MM_swapImage()"

You need to put the code on an object that has a OnMouseOver event.

Regards

cheito90210
09-18-2009, 03:30 PM
Hi

I need to pass a parameter to the function with the information of the image that i want to use. The third parameter. The Image information (image url) is stored in a resource value <%$ Resources:topMenu_discover_on.imageurl %>

If i use
onMouseOver="MM_swapImage('Image5','','/images/topmenu_on.jpg',1);" />
this work but i built a page with multiple language