Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I call that function in anchor tag mouseover event. I hide the div when the mouse is over on the anchor tag.

the function is called. The function is running without error. But the div is not hide.

I give the coding is
<a href="#"  önmouseover="projectsclick();" title="Projects"><span   class="icon_block m_projects">Projects </span></a>



JavaScript
function projectsclick() {
       var id = document.getElementById("<%=divprojects.ClientID%>");
       id.style = "display:none";
   }



My div is
<div id="divprojects"  runat="server"  class="switch_bar">
       <ul>

           <li><a href="#"><span class="stats_icon administrative_docs_sl"></span><span class="label">Profile </span></a></li>
           <li><a href="#"><span class="stats_icon finished_work_sl"><span class="alert_notify blue">30 </span></span><span class="label">Take Test </span></a></li>
           <li><a href="#"><span class="stats_icon config_sl"></span><span class="label">Test History </span></a></li>
           <li><a href="#"><span class="stats_icon archives_sl"></span><span class="label">Credits </span></a></li>


       </ul>

   </div>

Anybody help me...
Posted
Updated 29-Jan-13 20:25pm
v4
Comments
boogac 30-Jan-13 11:13am    
there is a mistake 'ö'nmouseover ??

try this

JavaScript
id.style.Display='none';
 
Share this answer
 
Hi,

Try like the following:

XML
function projectsclick() {
            document.getElementById("<%=divprojects.ClientID%>").css("display","none");
        }



Thanks
 
Share this answer
 
Comments
AshishChaudha 30-Jan-13 4:16am    
my 5+
[no name] 30-Jan-13 7:23am    
Thanks Ashish... :)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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