Framework 1.1 ASP.NET smartnavigation problem with Panel

  • Thread starter Thread starter kevin
  • Start date Start date
K

kevin

hi, all


it seems that smartnavigation has problem with the hide/show panel in the
aspx page,
I have three panel wih back/next buttons, the first two page works fine, but
at the last
page, all click on the buttons gives an error saying "Undefine" is null or
not an object.

what cauase that? because when I take off smartnagivation on web.config,
everything
works fine.


Kevin
 
Smart navigation is known to have many issues, and is generally not
recommended (at least not for anything with any level of complexity).
 
kevin said:
hi, all


it seems that smartnavigation has problem with the hide/show panel in the
aspx page,
I have three panel wih back/next buttons, the first two page works fine, but
at the last
page, all click on the buttons gives an error saying "Undefine" is null or
not an object.

what cauase that? because when I take off smartnagivation on web.config,
everything
works fine.


Kevin

Unfortunately Smart Navigation is really buggy :(

Instead, you can add this JavaScript to your page (I use it on my projects
and it works fine :) )

The idea is that when client ever clicks something on the page, it's scroll
position is stored to hidden variable by using getPosition() function. If
postback happens, setPosition() is called and it restores the scroll
position.

----------------------------------------------------------------------
Put this in the <head> tags of the page:

<script>
function getPosition()
{
document.forms[0].hid.value=document.body.scrollTop;
}

function setPosition()
{
document.body.scrollTop=document.forms[0].hid.value;
}
</script>



And at the body tag, place:



<body onmousedown="getPosition()" onload="setPosition()">
<form id=WebForm1 method=post runat="server">
<input type="hidden" id="hid" runat="server" >
 
Back
Top