Mouse coordinates in Web apps

Hi,

How do I get the mouse position in a web app?

System.mouseX & System.mouseY works fine in desktop apps, but gives an error when building it for web apps?

Use the MouseMove event.

Thank you,

After doing more digging I found out that I could use a javascript too, though getting the values into XOJO would require some WEBSDK magic.

[quote=268887:@Dinuka Perera]Thank you,

After doing more digging I found out that I could use a javascript too, though getting the values into XOJO would require some WEBSDK magic.[/quote]

I created a small WebSDK function that does not require MouseMove, it is published in the tips and trick column of XDev No 14.1, page 90. Unfortunately, Markus Winter did not credit me for JSRWhere.

You can download it here.

Thanks Michel for sharing, i tested it on Windows 10 with Opera, Chrome and Edge, all worked nicely. The only exception i found was Firefox, which always returns 0 0 for X Y values.

I will have a look. Thanks.