Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 17
Registered: ‎04-13-2010
My Device: 9550
My Carrier: Airtel

window.scrollTo(x,y) is not working in blackberry widget

Hi Adam,

 

As concern with scroll position, i am getting stuck on window.scrollTo(x,y). I want to go to specific (y position) on the body onload.

 

if i used it through menu click then i m able to go to specified position but while using on body onload it's not working?

 

So please guide me on this issue. 

Contributor
Posts: 17
Registered: ‎04-13-2010
My Device: 9550
My Carrier: Airtel

Re: window.scrollTo(x,y) is not working in blackberry widget

Hi All,

 

can anybody put focus on this issue???

Contributor
Posts: 17
Registered: ‎04-13-2010
My Device: 9550
My Carrier: Airtel

Re: X and Y coordinate offsets when scrolled?

Hi Neil/Adam,

 

I have tried window.scroll(x,y) on body onload of my page . but it seems not working.

 

Actually, My first page shows one image and after click on that image the next page (chapter contents) will show. In this case i need to maintain the previous scroll position where user had left the page. I put the previous scroll position in database and on the image click, i just retrive that value from DB and passed it to Javascript function. and trying to maintain scroll Position by using window.scroll(0, scrollValue)  or window.scrollTo. here scrollValue = 500; say; but it won't work??

 

So i decide to write the javascript extension with BBWP. So please guide to setVeticalScrollPosition. I have tried a lot but not able to resolve the problem.

 

It's very urgent !!!!

 

Thanks

Sunil Mishra

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: X and Y coordinate offsets when scrolled?

Hi Sunil,

 

Adam and I have been down working at WES for the week.. we'll try and get you an answer as soon as possible.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 17
Registered: ‎04-13-2010
My Device: 9550
My Carrier: Airtel

Re: X and Y coordinate offsets when scrolled?

Hi Neil,

 

Thanks for reply. currently i had managed it using Javascript Extension.

New Contributor
Posts: 2
Registered: ‎04-07-2010
My Device: Tour 9630
My Carrier: Verizon

Re: X and Y coordinate offsets when scrolled?

I'm a bit confused here. 

 

Why does window.pageXOffset work in the Browser, but not when embedded inside a widget?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: X and Y coordinate offsets when scrolled?

The scrolling surface and interaction with the browser content is a separate implementation between the browser and the embedded browser used in a widget.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
Contributor
Posts: 30
Registered: ‎02-05-2013
My Device: 9860
My Carrier: Vodafone

Re: X and Y coordinate offsets when scrolled?

Hi,

 

I am facing similar scroll position finding issue on BB10 webworks. Is there a solution for the same?

 

Currently tried with window.scrollY and window.pageYOffset but always returns 0.

 

Thanks in advance.