Postback issue?

  • Thread starter Mervin Williams
  • Start date
M

Mervin Williams

Postbacks cause a webform to re-display the page at the top. Well, I have a
fairly long form and would like the page display to be re-positioned where
the user clicked the button that caused the postback to occur.

Is there a way to do this?

Mervin Williams
 
P

Peter Rilling

That is the purpose of SmartNavigation. You can look into this. Be sure to
test your site thoroughly because the SmartNavigation architecture can cause
some problems with a site.
 
M

Mervin Williams

Thanks much!

By the way, is there an article that spells out some of the problems
encountered when using SmartNavigation?

Mervin Williams
 
P

Peter Rilling

There might be, but what I know of SmartNavigation is though my own
questions on newsgroups. I have not seen any article that documents the
architecture's behavior.

It may just come through trial and error as you determine what does and does
not work.

Basically, here is how SmartNavigation works. When you turn SmartNavigation
on, the page is rendered with a hidden iframe (visible if you view the
page's source). This iframe is the container for all submit requests. If
you click the submit button, the form data is copied to the iframe and
submitted there. The iframe then returns from the server and some
JavaScript will copy the DOM from the iframe to the main page. That is how
the browser can stay at the same place, it is never reloaded.

If you dynamically create JavaScript that is returned from the server based
on posted conditions, then you may run into problems because the JavaScript
will run in the iframe, not the main page. Also, you cannot turn
SmartNavigation off once it is on because the main page is never refreshed.
 
M

mwhipps

I too have had problems with SmartNavigation, I personally would use set
focus to the control you want on postback.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top