on 06-30-2015 12:50 PM
Hello,
I want to create an Onclick event when I press in a image. but after insert an image an click on it, the Script Events button is in gray.
It's a bug?
Best regards.
Hello Asier,
The current script functionality has very clear guidelines that are outlined in this thread Available Events for Scripting - SAP Imagineering - SCN Wiki
Here is the part I found useful when I encountered your problem:
GuiPicture:
Property: "onClick"
Defined in: GuiPicture
Event: "onClick"
Description: "JavaScript that is executed when someone clicks on GuiPicture. Only custom GuiPicture controls can have an onClick handler script."
Handler Signature: onClick(GuiPicture source)
So basically, if it isn't int he form of a 'GuiPicture' element you cannot bind a script to it. I tried using the script editor both manually and using the recording and I could no bind to this element, it simply did not detect it.
Poential workarounds...
The advice does list 'GuiPicture' so I suppose you could use the normal ABAP way of putting a picture into a screen and then bind a script to it. I found this with a quick google search Explore...ABAP: How to display a picture in a SAP screen
In addition, I found this link Scripting API - SAP Imagineering - SCN Wiki
Perhaps there is a way of using javascript to detect a click on a certain part of the screen, I found this extract from the SCN wiki link I posted
'
However, this is way beyond my knowledge of Personas and javascript, but it might push you in the right direction.
Let me know if it helps you,
Cheers,
Angus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.