Max Thieme
Posts: 0
Joined: Wed Apr 23, 2014 7:27 pm

Using the "HTML-Area" and Javascript together (ID-Exchange & Webservice Execution)

Hello together,

first of all look at the Screenshots first, so its easier too imagine what i mean.

Image

Thats my Editor-Area.
In the HTML-Area is a HTML-definition for a Popup (Screenshot 3). This Popup Appears if i click on the List item(you see on all Screenshots). I know its empty, thats only for testing reasons.

Image

Thats the Preview area before i click on the empty list.

Image

Thats the preview area after i clicked on the empty list.

Every Item in the List has an "ID" so i thought it 'll be no problem to catch the click on the ID. But over the Appery Standard "Eventhandler(where you can select the item and catch the event and create the action") the ID's not there. That makes sense for me.
I wanna call several Webservices if i click on one item(Menupoint) in the list.
For the first item i wanna call the service 1
For the second item i wanna call the service 2, etc...

Look forward and appreciate your help.

Greetz

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Using the "HTML-Area" and Javascript together (ID-Exchange & Webservice Execution)

Hello,

Can you clarify what components you're using in the Popup?

If you're using radio buttons, you can place event 'Value change' and select action 'Run JavaScript' to call service:
pre
your_service_name.execute({});
/pre
-- for appropriate radio buttons.

Max Thieme
Posts: 0
Joined: Wed Apr 23, 2014 7:27 pm

Using the "HTML-Area" and Javascript together (ID-Exchange & Webservice Execution)

Hello,

Thank for your Answer. I use a unsorted List to create the Menu. The items in the list are ui-btn's. The creation process is placed in the HTML-area component. Also the id declaration. I need to get the click of the ui-btn and run the JavaScript then. It will be easy I think but the mixture of the elements makes is much harder and complicated I think.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Using the "HTML-Area" and Javascript together (ID-Exchange & Webservice Execution)

Hello,

You can use appery.io radiobutton component and get value of selected items on "value change" event:

code var value = $('input[name=radio_group]:checked').val();
/code
Then according to this value invoke desired service.

Return to “Issues”