Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to pass mouse over through javascript plese give any ideas this problem
JavaScript
function call(labeldata,j)
{
var lab="label"+j;
//here i am pass to mouse over function cc(labeldata);
}


while go on mouse over that button show the label data please....
JavaScript
function cc(end)
   {
   //data
   }

the labels are i am create to dynamically by using literal control,that is a html buttons
please clarify this problem.............................


please please
Posted
Updated 2-Jul-12 0:35am
v3
Comments
Ganesan Senthilvel 2-Jul-12 6:35am    
Code format
AshishChaudha 2-Jul-12 6:38am    
what exactly you want?? single javascript function for mouseover in different buttons??
musale pradeep rao 2-Jul-12 7:10am    
yes
AshishChaudha 2-Jul-12 7:12am    
Please Check out the solution already given..
musale pradeep rao 2-Jul-12 7:16am    
Uncaught ReferenceError: onover is not defined

1 solution

//here is the javascript for show and hide

JavaScript
<script language="javascript" type="text/javascript">
    function onover()
    {
       // alert("over");
        document.getElementById('<%=Label1.ClientID%>').style.display="inline";
    }
    function onout()
    {
        //alert("out");
        document.getElementById('<%=Label1.ClientID%>').style.display="none";
    }
    
    </script>


//calling the javascript onmouseover and mouseout

XML
<asp:Button ID="Button1" runat="server" Text="Button" onmouseover="javascript:onover(this);" onmouseout="javascript:onout(this);"/>
            <asp:Button ID="Button2" runat="server" Text="Button" onmouseover="javascript:onover(this);" onmouseout="javascript:onout(this);"/>


mark it solution if this is your solution.
Thanks
Ashish
 
Share this answer
 
Comments
musale pradeep rao 2-Jul-12 7:15am    
Uncaught ReferenceError: onover is not defined error is comming
AshishChaudha 2-Jul-12 7:17am    
Cud I see your code please. The solution given is working fine...
musale pradeep rao 2-Jul-12 7:20am    
buttonletranmapview.Text = buttonletranmapview.Text + "<input id='but" + i + "' type='button' value='View' style='height:30px;width:75px;' önmouseover='javascript:onover(this);' /><br/>";
function Button1_onclick()
{

n=document.getElementById('Countnumbers').value;
for(var j=1; j<=n;j++)
{


calcRoute(ss,j);
}
function calcRoute(dist)
{
function onover()
{
viewmap(dist);
}
}
function viewmap(end)
{
var start = document.getElementById('startvalue').value;
var querry = document.getElementById(end).innerHTML;
querry=querry.replace(/[!@#$%&^*()]/gi," ");

window.open("Viewmap.aspx?start="+start+"&end="+querry+"","Map","width=550,height=350px");
}
musale pradeep rao 2-Jul-12 7:22am    
here i am attached just button önmouseover code only
musale pradeep rao 2-Jul-12 7:25am    
are getting this code are not please

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900