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.
 

Aholics.com

Active member
Joined
Jun 15, 2004
Messages
27
Location
San Diego
Programming Experience
10+
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.
 

arg_soccer

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

droy1981

New member
Joined
May 25, 2005
Messages
2
Programming Experience
1-3
Any solution?

Did anyone get a solution for this? I am having a similar problem.
 

droy1981

New member
Joined
May 25, 2005
Messages
2
Programming Experience
1-3
Got it

I figured it out....Smart Navigation on IE was the problem
 

arg_soccer

New member
Joined
Jun 3, 2004
Messages
4
Programming Experience
5-10
Could you please explain this to me? Is this some kind of browser setting?
 
Top Bottom