Topic: Help with window.scrollTo() in xajax Version 0.2.4 (stable release)

Hi everybody, I've problem, have a functions in a archive php it wich valid a data that get of a form (this is ok), but the that I want is call to this function (window.scrollTo() ) that used in js to the by example in a event onclick(), for that my page that is contained in a iframe, climb to the top of the iframe to scroll, that all, this the I want that it do it  by example when return a call xajaxresponse in the innerHTML it wich for this in my functions put a number integer it wich when is 0 is that there was no error and if 1 is that if, this I've in the code of functions that validate, ok that's all, I hope your help guys and hope I have not been so extensive...


Thanks...

Re: Help with window.scrollTo() in xajax Version 0.2.4 (stable release)

Hi,

Try $response->script('window.scrollTo()') to call the scrollto function.

Ed

P.S. You should probably convert to the latest version of XAJAX as I heard that support for 0.2 is being dropped soon.

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Help with window.scrollTo() in xajax Version 0.2.4 (stable release)

Thanks I worked perfectly, but adapted version 0.2.4 ie with $response->addScrip("window.scrollTo(0,0);");  to scroll up the page.
Who would note also demonstrates.

Re: Help with window.scrollTo() in xajax Version 0.2.4 (stable release)

sorry is $response->addScript("window.scrollTo(0,0);");