The only problem with that solution is you provide no degradation to people without javascript.
On 8/5/09, DJJQ <joll...@hotmail.com> wrote: > > Thank you for your solution, but instead I changed <a href=#> to <a > href="javascript:null()"> and it works like a charm. > > On Aug 5, 11:00 pm, "Alex McAuley" <webmas...@thecarmarketplace.com> > wrote: >> Nope... >> >> If you are observing the click with observe() >> just call Event.stop(event); on it >> >> Example. >> >> $('myHref').observe('click',function(event) { >> Event.stop(event); >> Your ajax code here. >> >> }); >> >> That way it will degrade in browsers not having javascript and they will >> just goto the href of the link. >> >> HTH >> >> Alex Mcauleyhttp://www.thevacancymarket.com >> >> >> >> ----- Original Message ----- >> From: "DJJQ" <joll...@hotmail.com> >> To: "Prototype & script.aculo.us" >> <prototype-scriptaculous@googlegroups.com> >> Sent: Wednesday, August 05, 2009 9:42 PM >> Subject: [Proto-Scripty] Re: Browser scroller position after Ajax.Update >> >> Yes that's right. Maybe that's the problem, should I javascript:null >> it? >> >> On Aug 5, 10:40 pm, "Alex McAuley" <webmas...@thecarmarketplace.com> >> wrote: >> > what does the link look like ? >> >> > <a href="#" >Click me</a> >> >> > Like that ? >> >> > Alex Mcauleyhttp://www.thevacancymarket.com >> >> > ----- Original Message ----- >> > From: "DJJQ" <joll...@hotmail.com> >> > To: "Prototype & script.aculo.us" >> > <prototype-scriptaculous@googlegroups.com> >> > Sent: Wednesday, August 05, 2009 9:33 PM >> > Subject: [Proto-Scripty] Re: Browser scroller position after Ajax.Update >> >> > Oh my god my english was terrible in my post, sorry about that. >> > I'll try to explain the problem again: >> > On my php page I have a link a long way down the page, so users have >> > to scroll down a bit. the link triggers an ajax.update on the page. >> > When users press the link the browser returns to the top of the page. >> > How do I restore the browser position to where the link is? (So the >> > scroller position remains unchanged when calling ajax update) >> >> > On Aug 5, 9:45 pm, "Alex McAuley" <webmas...@thecarmarketplace.com> >> > wrote: >> > > Can you explain it a bit better please... i cant really understand >> > > what >> > > you >> > > mean by that >> >> > > Thanks >> >> > > Alex Mcauleyhttp://www.thevacancymarket.com >> >> > > ----- Original Message ----- >> > > From: "DJJQ" <joll...@hotmail.com> >> > > To: "Prototype & script.aculo.us" >> > > <prototype-scriptaculous@googlegroups.com> >> > > Sent: Wednesday, August 05, 2009 8:22 PM >> > > Subject: [Proto-Scripty] Browser scroller position after Ajax.Update >> >> > > > Hello. >> > > > My problem when is apparent on my page. The div to be updated (and >> > > > link) are a long way down the page so users have to scroll down. >> > > > When they press the link and thus update the div the browsers >> > > > scroller >> > > > returns to top, forcing the user to scroll down again to the div. >> > > > Is there any "quickfix" (like option I have missed) or more advanced >> > > > solution? >> >> > > > Best Regards and Thanks in Advance, Joel > > > -- Sent from my mobile device --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---