Prev: AJAX AutocompleteExtender does not work when type between delimeters
Next: SecurityException AspNetHostingPermission weirdness
From: Vince Xu [MSFT] on 24 Feb 2010 21:57 Hi Peter, | Does this work for ajax updates too ?? If you mean ajax async request, it can be used in any scenario on client. It's just the javascript code which is based on asp.net ajax. -- Regards, Vince Microsoft Online Support
From: Alexey Smirnov on 25 Feb 2010 06:00 On Feb 15, 10:56 am, "Peter Larsen [CPH]" <PeterLar...(a)community.nospam> wrote: > Hi, > > I have a ajax page where i want the page to scroll to the bottom of the page > on each update. > I have tried to use "#bookmarks" and "d.scrollIntoView(true);" scripts, but > it doesn't seems to be triggered on updates. > > Is it possible to fire scripts on ajax updates or how should i fix this > scroll problem ?? > > Thank you in advance > Peter Peter, it should be possible with scrollIntoView. Just check before it if d is not null. Maybe this is your problem. var d = document.getElementById('h1'); if (d != null) d.scrollIntoView(true); More at http://msdn.microsoft.com/en-us/library/ms536730.aspx Hope this helps
From: Vince Xu [MSFT] on 2 Mar 2010 02:49 Hi, Did you resolve it? -- Regards, Vince Microsoft Online Support -------------------- | X-Tomcat-ID: 11541696 | References: <#2JmuUirKHA.4492(a)TK2MSFTNGP05.phx.gbl> <HAhEhvtrKHA.1412(a)TK2MSFTNGHUB02.phx.gbl> <u50EoW8sKHA.5868(a)TK2MSFTNGP05.phx.gbl> | MIME-Version: 1.0 | Content-Type: text/plain | Content-Transfer-Encoding: 7bit | From: v-vincex(a)online.microsoft.com (Vince Xu [MSFT]) | Organization: Microsoft | Date: Thu, 25 Feb 2010 02:57:40 GMT | Subject: Re: AJAX | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | Message-ID: <aW4dVZctKHA.2540(a)TK2MSFTNGHUB02.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet | Lines: 7 | Path: TK2MSFTNGHUB02.phx.gbl | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.dotnet.framework.aspnet:96696 | NNTP-Posting-Host: tk2tomimport1.phx.gbl 10.230.18.247 | | Hi Peter, | | | | Does this work for ajax updates too ?? | | If you mean ajax async request, it can be used in any scenario on client. | It's just the javascript code which is based on asp.net ajax. | | -- | Regards, | | Vince | | Microsoft Online Support | | |
From: Peter Larsen [CPH] on 5 Mar 2010 03:37 Hi, First it didn't work for IE, but after changing the script a bit, it now works for both browsers. This is what i have: function pageLoad() { if(Sys.Browser.agent == Sys.Browser.InternetExplorer) document.documentElement.scrollTop = document.body.scrollHeight; else document.documentElement.scrollTop = document.documentElement.scrollHeight; } I have changed the IE part from "document.body.scrollTop = document.body.scrollHeight" to "document.documentElement.scrollTop = document.body.scrollHeight". Thanks for your help. BR Peter "Vince Xu [MSFT]" <v-vincex(a)online.microsoft.com> wrote in message news:MndczzduKHA.5576(a)TK2MSFTNGHUB02.phx.gbl... > Hi, > > Did you resolve it? > > -- > Regards, > > Vince > > Microsoft Online Support >
From: Peter Larsen [CPH] on 5 Mar 2010 04:00
Hi Alexey, Using scrollIntoView() does work on first update, but nothing happens on the following ajax updates. /Peter "Alexey Smirnov" <alexey.smirnov(a)gmail.com> wrote in message news:66d75c21-d93a-4e89-b7ab-107d886f235c(a)b2g2000yqi.googlegroups.com... On Feb 15, 10:56 am, "Peter Larsen [CPH]" <PeterLar...(a)community.nospam> wrote: > Hi, > > I have a ajax page where i want the page to scroll to the bottom of the > page > on each update. > I have tried to use "#bookmarks" and "d.scrollIntoView(true);" scripts, > but > it doesn't seems to be triggered on updates. > > Is it possible to fire scripts on ajax updates or how should i fix this > scroll problem ?? > > Thank you in advance > Peter Peter, it should be possible with scrollIntoView. Just check before it if d is not null. Maybe this is your problem. var d = document.getElementById('h1'); if (d != null) d.scrollIntoView(true); More at http://msdn.microsoft.com/en-us/library/ms536730.aspx Hope this helps |