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
New Developer
Posts: 9
Registered: ‎08-21-2008
My Device: Not Specified
Accepted Solution

Storm: Capturing 'onTouch' with JavaScript?

Hi,

does anybody know a way to create something equivalent to a mouseOver in response to touching an object in the Storm's touch screen UI? (basically, I would like to highlight an item, as your finger goes over it, without switching to cursor mode).

 

Thanks a lot for any ideas!

 

Guru I
Posts: 18,517
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Storm: Capturing 'onTouch' with JavaScript?

you can use a mouseOver event and force the cursor not to change.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 9
Registered: ‎08-21-2008
My Device: Not Specified

Re: Storm: Capturing 'onTouch' with JavaScript?

sorry, I think I didn't explain the problem very clearly (but thanks a lot for your prompt reply!):

 

on the Storm you can operate the Browser in two modes: either you click on links etc. directly with your finger, or you switch on a cursor mode and the touch screen then operates almost more like a trackpad to let you move the cursor around. In the cursor mode I get my mouseOver highlights just as you'd expect when the cursor goes over the object. But I would like to be able to give the user some feedback in the *other* mode (I think it's called Pan Mode, but not sure right now) and highlight the object when they touch it with their finger. At the moment I can only get the built in link-selection on text links, but I want to be able to attach a custom 'onTouch' function to a div.

 

Does that make any sense?

Cheers

 

 

Guru I
Posts: 18,517
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Storm: Capturing 'onTouch' with JavaScript?

it makes sense and your need is very clear now.
But unfortunately the touchscreen is new technology for Blackberry devices, so I think you will have to wait for a RIM employee to answer you.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 9
Registered: ‎08-21-2008
My Device: Not Specified

Re: Storm: Capturing 'onTouch' with JavaScript?

Just in case anybody else is interested:

 

Apparently there is no JS handler that can pick up on touch, but the CSS :hover pseudo-class is supported (in chained selectors only on the last simple selector) - so at least that's good enough for some visual feedback on touch.