#1 2017-01-30 22:05:59

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 37

Question about HTML code inside VARS for HTML control

Hello David,

I am doing a lot with your "masterpiece" AppBuilder software... ;-D

I have a doubt that I wanted to share with all of you. I am using the HTML control to create dynamically content. What I am doing is use the SIMPLEGET or SIMPLEPOST actions included at AppBuilder to retrieve update info from a PHP server and then use the HTML control to show the updated info.

The PHP server produce all the HTML code necessary for the HTML control, so inside HTML control there is only a VAR. The VAR used by SIMPLEGET or SIMPLEPOST to store the server response.

Everything seems to be ok, the VAR stores all the code without problems, and it shows with no problem, BUT I cannot use the [HtmlContent1.Event.target.id] to interact with it because all the <a href=”” id=””> are not working.

I have tried to replace all “ for \” or \x22 but it is not working too…

I attached a sample, without the SIMPLEGET or SIMPLEPOST part… just a VAR with some code and the HTML control with code and the var. html_and_vars.ab

Hope you can help me with this issue.

Thank you so much!!!

Offline

#2 2017-01-31 18:24:15

fakie
Banned
Registered: 2016-10-28
Posts: 36

Re: Question about HTML code inside VARS for HTML control

Are you trying to do stuff like..

RemoveClass "HtmlContent1.myid1" "hide"

StartJS
$('#myid2').show();
EndJS

where your htmlcontent1 exist of

<p id=myid1> paragraph 1 </p>
<p id=myid2> paragraph 2 </p>

Because I'm battling with the same thing.
I have an report, and i have two images on the report (in the same record).
When I click on the image, the report1.event.target.id passes back the image id and the Record.ID passes back the current record, but I cannot affect the image from within appbuilder (yet!)
ie. I want to hide an image.


This is my favourite quote.

Offline

#3 2017-01-31 20:18:06

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,659
Website

Re: Question about HTML code inside VARS for HTML control

Hello to all,

I understand perfectly what you wanted Eduardo and then I am look here for a possible solution or workaround, but they are not possible. Let me to explain a bit. We can certainly place arbitrary HTML code inside an HTML control. We can (take a look at the HTMLContent app sample) place also buttons or links with their own IDs in order to react when they are clicked by the user, using the HTML control Click event.

However, when we place an application variable inside an HTML control, certainly such variable's contents can contains also HTML, but, they are not "binded" with the application, which means, for example, that the HTML control Click event doesn't nothing about the HTML elements' IDs. Searching for a possible solution I find a way to "bind" or "compile" the variable's HTML content, however, this only works if that variable content is one (and only one) HTML element, and no other thing.

So probably for your purpose the better workaround can be to use the Report control instead the HTML one. The report control is quite powerfull (App Builder includes up to 17 Report* samples) and offer to us a way to place links, buttons, videos... inside, determined dinamically as you wanted. I am sorry if can't offer another solution, that is, exactly what you wanted, but I think it's merelly imposible even with the appropiate App Buidler's modifications.

Offline

#4 2017-01-31 21:17:06

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 37

Re: Question about HTML code inside VARS for HTML control

Woooooooouuuu ;-D

THANK YOU SO MUCH!!! DAVID!!!

I am terribly sorry because I did not try, or even focused on, the REPORT control... Soooo sorry ;-(  but... ;-DDDDD It is soooooo powerful. I think I could do what I have in mind... even better because all the functionalities. Thank you su much...

Eduardo ;-D

Offline

#5 2017-01-31 21:19:34

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,659
Website

Re: Question about HTML code inside VARS for HTML control

Hello to all,

eduardoalfaro wrote:

Woooooooouuuu ;-D

THANK YOU SO MUCH!!! DAVID!!!

I am terribly sorry because I did not try, or even focused on, the REPORT control... Soooo sorry ;-(  but... ;-DDDDD It is soooooo powerful. I think I could do what I have in mind... even better because all the functionalities. Thank you su much...

Eduardo ;-D

Always thanks you Eduardo! And please, let me know if you have any further question. smile

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.