Framework 1.1 ASP.NET smartnavigation problem with Panel

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
 
M

Marina

Smart navigation is known to have many issues, and is generally not
recommended (at least not for anything with any level of complexity).
 
K

Krissy

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" >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top