ASP.Net : Problem Javascript Menu

arg_soccer

New member
Joined
Jun 3, 2004
Messages
4
Programming Experience
5-10
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?

Thanks.
 
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:

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

<form id="Form1" method="post" runat="server">
..
..
</Form>
</Body>


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?

Thanks.
 
Back
Top