Firefox refreshing unexpectedly

  • Thread starter Thread starter Howard Swope
  • Start date Start date
H

Howard Swope

I have an ASP.Net 2.0 web site that I am testing against firefox (Everything
works right in IE).. My site has a navigation framework setup with master
pages and it ues the menu and tree controls. There are buttons on the pages
that when clicked call functions that change the apearance of the navigation
structure by changing styles on certain elements.

When these buttons are pressed when running in firefox, the propper
apearance changes occur, but then the page is immediately reloaded to its
original appearance.

Does anyone have any ideas how to keep this from occurring?
 
Howard said:
I have an ASP.Net 2.0 web site that I am testing against firefox (Everything
works right in IE).. My site has a navigation framework setup with master
pages and it ues the menu and tree controls. There are buttons on the pages
that when clicked call functions that change the apearance of the navigation
structure by changing styles on certain elements.

When these buttons are pressed when running in firefox, the propper
apearance changes occur, but then the page is immediately reloaded to its
original appearance.

Does anyone have any ideas how to keep this from occurring?

What kind of buttons are you using?

To run Javascript on the page without posting anything back to the
server, you should use an input tag with type="button", not type="submit".
 
My Buttons look like this in the code:



<div id="buttonBar" class="buttonBar">

<button id="toggleTreeButton" runat="server"
onclick="ToggleTree()" title="Toggle tree pane">

<img src="/images/toggle.gif" alt="Toggle tree pane" />

</button>

<button id="moveSplitterLeftButton" runat="server"
onclick="MoveSplitter('left')" title="Move splitter left">

<img alt="Move splitter left" src="/images/moveleft.gif"
/>

</button>

<button id="moveSplitterRightButton" runat="server"
onclick="MoveSplitter('right')" title="Move splitter right">

<img alt="Move splitter right" src="/images/moveright.gif"
/>

</button>

<button id="printableButton" onclick="ShowPrintable()"
title="Show printable version">

<img alt="Show printable version"
src="/images/printable.gif" />

</button>

</div>
 
You were absolutely right. I changed the type to type="button" and
everything worked well.

Thanks!
 
Back
Top