Dear people, I made a simple php based calendar which ables you to skip through months and years. Every time you skip to another month (or year), the page uses the prototype Ajax.Updater and requests a php page which returns the next month. The calendar works fine except for one thing. After each update the page jumps back to it''s top which makes it completely unusable. I allready tried to save the pageXOffset and pageYOffset and use some javasript function to set the page back where it where. This is no solution however because you can literally see the page go up and down again... How can I keep the scrollbars where they are? Many thanks in advance, Erik --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Without seeing the behaviour of your page and your HTML it is difficult to determine where you''re going wrong. Please post a URL to your page. On Jan 7, 4:08 pm, Erik <erik.hoo...-47ckw973qWsGTViba+RHyw@public.gmane.org> wrote:> Dear people, > > I made a simple php based calendar which ables you to skip through > months and years. Every time you skip to another month (or year), the > page uses the prototype Ajax.Updater and requests a php page which > returns the next month. > The calendar works fine except for one thing. After each update the > page jumps back to it''s top which makes it completely unusable. > I allready tried to save the pageXOffset and pageYOffset and use some > javasript function to set the page back where it where. This is no > solution however because you can literally see the page go up and down > again... > > How can I keep the scrollbars where they are? > > Many thanks in advance, > Erik--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
without actually seeing it, it sounds to me like you have a <a href="#" onclick="doSomething()">next</a> kind of scenario it''s the # thats doing it. On Jan 7, 2008 4:32 PM, Diodeus <diodeus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Without seeing the behaviour of your page and your HTML it is > difficult to determine where you''re going wrong. Please post a URL to > your page. > > On Jan 7, 4:08 pm, Erik <erik.hoo...-47ckw973qWsGTViba+RHyw@public.gmane.org> wrote: > > Dear people, > > > > I made a simple php based calendar which ables you to skip through > > months and years. Every time you skip to another month (or year), the > > page uses the prototype Ajax.Updater and requests a php page which > > returns the next month. > > The calendar works fine except for one thing. After each update the > > page jumps back to it''s top which makes it completely unusable. > > I allready tried to save the pageXOffset and pageYOffset and use some > > javasript function to set the page back where it where. This is no > > solution however because you can literally see the page go up and down > > again... > > > > How can I keep the scrollbars where they are? > > > > Many thanks in advance, > > Erik > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Many many thanks for the quick response. it is the # indeed. I had to return a false. goodnight, Erik On 7 jan, 22:42, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> without actually seeing it, it sounds to me like you have a <a href="#" > onclick="doSomething()">next</a> kind of scenario > > it''s the # thats doing it. > > On Jan 7, 2008 4:32 PM, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Without seeing the behaviour of your page and your HTML it is > > difficult to determine where you''re going wrong. Please post a URL to > > your page. > > > On Jan 7, 4:08 pm, Erik <erik.hoo...-47ckw973qWsGTViba+RHyw@public.gmane.org> wrote: > > > Dear people, > > > > I made a simple php based calendar which ables you to skip through > > > months and years. Every time you skip to another month (or year), the > > > page uses the prototype Ajax.Updater and requests a php page which > > > returns the next month. > > > The calendar works fine except for one thing. After each update the > > > page jumps back to it''s top which makes it completely unusable. > > > I allready tried to save the pageXOffset and pageYOffset and use some > > > javasript function to set the page back where it where. This is no > > > solution however because you can literally see the page go up and down > > > again... > > > > How can I keep the scrollbars where they are? > > > > Many thanks in advance, > > > Erik--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I know some people frown on it, but on my Ajax links i always set the href to javascript: void(0) just to avoid such errors like that when coding glad it helped. On Jan 7, 2008 5:57 PM, Erik <erik.hooven-47ckw973qWsGTViba+RHyw@public.gmane.org> wrote:> > Many many thanks for the quick response. it is the # indeed. I had to > return a false. > > goodnight, > Erik > > On 7 jan, 22:42, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > without actually seeing it, it sounds to me like you have a <a href="#" > > onclick="doSomething()">next</a> kind of scenario > > > > it''s the # thats doing it. > > > > On Jan 7, 2008 4:32 PM, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Without seeing the behaviour of your page and your HTML it is > > > difficult to determine where you''re going wrong. Please post a URL to > > > your page. > > > > > On Jan 7, 4:08 pm, Erik <erik.hoo...-47ckw973qWsGTViba+RHyw@public.gmane.org> wrote: > > > > Dear people, > > > > > > I made a simple php based calendar which ables you to skip through > > > > months and years. Every time you skip to another month (or year), > the > > > > page uses the prototype Ajax.Updater and requests a php page which > > > > returns the next month. > > > > The calendar works fine except for one thing. After each update the > > > > page jumps back to it''s top which makes it completely unusable. > > > > I allready tried to save the pageXOffset and pageYOffset and use > some > > > > javasript function to set the page back where it where. This is no > > > > solution however because you can literally see the page go up and > down > > > > again... > > > > > > How can I keep the scrollbars where they are? > > > > > > Many thanks in advance, > > > > Erik > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
In cases like this I use <a href="#" onclick="doSomething(); return false;">next</a> return false prevents default behaveour of tag a On Jan 7, 11:42 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> without actually seeing it, it sounds to me like you have a <a href="#" > onclick="doSomething()">next</a> kind of scenario > > it''s the # thats doing it. > > On Jan 7, 2008 4:32 PM, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Without seeing the behaviour of your page and your HTML it is > > difficult to determine where you''re going wrong. Please post a URL to > > your page. > > > On Jan 7, 4:08 pm, Erik <erik.hoo...-47ckw973qWsGTViba+RHyw@public.gmane.org> wrote: > > > Dear people, > > > > I made a simple php based calendar which ables you to skip through > > > months and years. Every time you skip to another month (or year), the > > > page uses the prototype Ajax.Updater and requests a php page which > > > returns the next month. > > > The calendar works fine except for one thing. After each update the > > > page jumps back to it''s top which makes it completely unusable. > > > I allready tried to save the pageXOffset and pageYOffset and use some > > > javasript function to set the page back where it where. This is no > > > solution however because you can literally see the page go up and down > > > again... > > > > How can I keep the scrollbars where they are? > > > > Many thanks in advance, > > > Erik--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---