cancel
Showing results for 
Search instead for 
Did you mean: 

Get the mouse x and y co-ordinates via Web DynPro

Former Member
0 Kudos

I need to get the mouse co-ordinates via Web DynPro. As javascript is restricted I need you peoples help.

I need to implent this functionality to get the region of the image clicked.

Your suggestions are welcome

-Naren

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Naren,

in order to get the mouse coordinates you can only use Java code. Please, follow this tutorial:

http://www.video-animation.com/java_008.shtml

Usually this algorithm is executed to develop simple games program. I think you have no problem to put this solution in your WD because it is standard Java.

Another interesting tips is this:

http://www.leepoint.net/notes-java/GUI-lowlevel/mouse/12mouseclicks.html

Hoper this help you.

Regards,

Vito

Former Member
0 Kudos

Vito,

The tutorial you mention uses the "Java IDE for Children and Beginning Programmers"

Also the MouseListener tutorial in the second link is GUI code for Swing, it is not related to web programming in any way.

To answer the second question, I am not aware of any way of getting custom javascript into a WD app but would be interested in finding out!

Former Member
0 Kudos

The sample link provided relates to swings and applet, Please let me know how to implement the same in web dynpro

-Nare

Former Member
0 Kudos

Hi All,

in JWD is not possible to use javaScript. Naren, the only way you have to catch your request using JWD is Java code. So, an idea maybe to use Rhino JavaScript interpreter library (a way to create scripting for Web Dynpro) and use it in WebDynpro application.

Please, go throw this blog /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro

It's clear that you need to to deploy Rhino library to J2EE server .

About Rhino: http://www.mozilla.org/rhino/

Regards,

Vito

Answers (0)