Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
This is my master.master.cs page.

when click my aspx menu item, then page blinking/flashing in chrome browser. buts its perfectly work Mozilla Firefox.

i can not use updatepanel in code.

please help me..


HTML
<script type="text/javascript">
        function submitform()
        { document.getElementById("form1").submit(); }
        window.onload = function () {
            document.getElementById("Menu1").style.display = "block"; //or other display options if needed
            //document.getElementById("Menu1").style = "display.block";
        }
    </script>
Posted
Updated 6-Dec-15 23:31pm
v2
Comments
Kornfeld Eliyahu Peter 7-Dec-15 5:23am    
1. You should post the relevant HTML too
2. Better format the code you post so we can read it easily
3. You should check the debugger of Chrome to see if there were any errors...
Afzaal Ahmad Zeeshan 7-Dec-15 5:35am    
Function should not trigger again on itself. By the way, why are you changing the display using JavaScript, when you can use CSS for this.
ahasan nahid 7-Dec-15 5:46am    
Thanks all, i am already use css behavior but its doesn't work, this page masete.master in asp.net page

try with $("#Menu1").fadeIn("fast"); in place of
document.getElementById("Menu1").style.display = "block";
 
Share this answer
 
v2
Can you please try like this

var menu = document.getElementById('Menu1');
if (menu.style.display == 'none') {
menu.style.display = 'block';
}
else {
menu.style.display = 'none';
}
}
 
Share this answer
 

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