WebHTML click events

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

WebHTML click events

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by David Mitchell >> Sat, 19 Feb 2000 4:23:21 GMT

I am trying to make a button (for a web-enabled app) which highlights when the mouse goes over, goes down when the mouse presses etc. This is easily possible for a regular JADE app, but the problem comes when you try to do it on the web. I have tried to get around the problem by writing my own HTML to handle the pictures (highlighting, pressing etc) and I put this code into a WebHTML control.

Unfortunately, the WebHTML control doesn't capture click events when it is run on a Web-Enabled app. Does anybody have any ideas of how I could do this?

Thanks in advance

--
David Mitchell
JADE Kid - 1998
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: WebHTML click events

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by michael sihabouth >> Mon, 21 Feb 2000 23:10:05 GMT

Hi David,

I've done something similar to what you want to do..

you need to add a WebHotspot control and put that over your button or picture control or any other control(s) that you are using.

This seems to be a silly way of doing it but, I've found that this is the only way that works..

the hotspot control will capture the click event and any other events that are associated with that control....

give it a go and let me know how you went...


:-)

Michael S

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: WebHTML click events

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by David Mitchell >> Tue, 22 Feb 2000 1:32:32 GMT

I can't test it until Saturday, because I don't have an NT machine till then, but thanks, I'll try it.

--
David Mitchell
JADE Kid - 1998
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: WebHTML click events

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by Frank Pitt >> Mon, 6 Mar 2000 21:04:03 GMT
you need to add a WebHotspot control and put that over your button or picture control or any other control(s) that you are using.

This seems to be a silly way of doing it but, I've found that this is the only way that works..

I just thought I'd explain why it's not such a silly way of doing it.

You have to remember that on a web form, as opposed to a thin or thick client, you are not running directly under the window manager, so do not get all mouse events passsed you to by default, as all events are caught by the browser first.

You need to put something on your page that _browser_ knows can handle mouse events. Normal HTML buttons don't handle mouseover events, only focus and click events, so the browser won't pass them to it.

Frank Pitt
Tutor / Consultant
Software Education Associates Ltd
Web http://www.softed.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: WebHTML click events

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by Stephen Barker >> Fri, 17 Mar 2000 1:28:41 GMT

One solution is to code the required JavaScript statements into bubble help on the Picture or Button. You just need to start it with a double quote to terminate the ALT string in the html, and leave out a corresponding double quote at the end of your own script.

--
Stephen Barker
Cardinal Healthcare

Ph: (64) 3 365-2266 Fax: (64) 3 358-9301


Return to “Tips and Techniques”

Who is online

Users browsing this forum: Bing [Bot] and 24 guests