ASP.Net : Problem Javascript Menu


New member
Jun 3, 2004
Programming Experience
Hello All,

There is an external javascript file which I have included in my .net web project.
Whenever the web page is loaded for the first time, the javascript menu appears where it should. But whenever I submit the form, javascript menu just disappears. The file path is correct since I can view the menu when the page is loaded for the first time. I don't understand why it just disappears.

Does anyone has any idea about this problem?

You'll have to see what the Javascript function is doing. It's possible that it needs to be loaded during each page refresh or postback.

It sounds to me you have the javascript menu populating itself during a "Not Page.IsPostBack". This would load it during the first page load, but when doing a post-back it would not happen.
I am not populating javascript in not page.ispostback. All the menu-items are hard-coded and everything required for the script is inside that file.

HTML file looks like this:

<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<script language="JavaScript" src="./menu.js" type="text/JavaScript" id="scrMenu">
Your browser does not support script</noscript>

<form id="Form1" method="post" runat="server">

Whenever I refresh the page, menu is reloaded. Only after submitting the form menu disappears.
How do I make explicit call to load that script after form submission?