Html Tags in AB/ PHP JSON data to AB


Michael Adesegun
Hi David, Is it possible to use all Html Tag, Javascript, Jquery and Ajax inside of AB? thinking I could find other means to used database server side data in AB am still finding it difficult to parse data into AB. Incase fellow users have a simplified way to use PHP MySql with AB pls help me out. I need step by step way to using JSON data. I can do php to JSON, the only problem is bringing it into AB. you can use my php json here: https://cherithwells.com/tester.php us it to display the data in AB. Thanks in advance.
MA

DecSoft

Hello Michael,

There are various sample apps that deal with HTTP calls, and, one of them, the Database sample, even when appear quite simple, it's a complete CRUD app, which allows to Create, Read, Update and Delete data from a server database. Basically the app made HTTP calls and deal with the server's response. So I think you must try to be a bit more specific, around the possible problem that you get.

You talk about HTML tags, Javascript, Ajax... and yes... we can use these stuff in AB, since we are talking about HTML, CSS and Javascript apps. But I am not quite sure that this is your problem. You mention this URL: "https://cherithwells.com/tester.php", and, certainly that URL offers certain JSON response, however, in fact is a wrong response, which can cause problems to be processed:

As you can see above, the response is a JSON object, but, just at the end, the "worker!" string appear... well... that string in that JSON response probably cause problems to be processed. On the other hand, process the "{"a":1,"b":2,"c":3,"d":4,"e":5}" response can't be more easy. Since the response is a JSON object, we can directly access to that object properties, for example:

I hope the above can help you in some manner, but, please, go ahead if you have any further question.



DecSoft

If the above didn't reply your question, please, let me know, Michael.

Just post here if you have any specific problem or question.



Michael Adesegun
Yea, I think i must be missing something. I just need like a step by step procedure of using the JSON. Like 1. Drop a HttpClient control on the side of the page 2. enter the url of the php to fetch the needed data from my server. e.g. "https://cherithwells.com/tester.php" 3. .... I tried you sample : // Show "1" Alert "" "[MyHttpClient.Response.a]" but i received an undefined error.
MA

DecSoft

Hello Michael,

I think that can understand what you wanted and I will try to prepare something like a small video tutorial to follow your proposed steps. I will do it as quickly as possible.



Michael Adesegun
Yes, I will really appreciate it, i can do php very well. please do show CRUD in the steps on Using AB
MA

DecSoft

Hello Michael,

The problem is the time... and that I am not very good with videos, in fact, I want to create some of them, but, english is not my first language, so I have found some difficulties... but in fact you talk abou a CRUD sample app... and what is exactly the Database sample app already existing! Is a sample app that show how we can Create, Read, Update and Delete records from a server database.

So... the point can be that you take a look at that sample... and try to understand it... and of course post in the forum if you find some problem or need something about: but in that case we deal with specific things, more easy to achieve than general ones. For example, I am considering a possible video tutorial (if can have some time to do it!), but what I am thinkin is not a CRUD tutorial... not right now... :-/

So why don't take a look at the Database sample app, step by step, view by view, control by control, and therefore you ask here if you have some specific question? I will be happy to help when possible.



Michael Adesegun
I do not need up a video, i just need tips like: 1. use Httpclient insert the url to your online php file (to fetch) data 2. code to call the data.... etc 3. how to display the data etc. use this simple result from : "https://cherithwells.com/tester.php", like that I will understand. thanks David
MA

DecSoft

Hello Michael,

Ok, let me to think about and then I will try to help you as quickly as possible. :-)



Asley Cruz
Hi Michael, Tell me exactly what you want to do with the info in test.php. Maybe I can help you too, a little bit. I hope so, regards.
AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


Michael Adesegun
Hi Asley, thanks for your combined efforts to helping me out. The problem is knowing what exactly to do in a step by step version of calling up a data from mysql database. I know php well enough to do any CRUD processes. What I need is a work through on how to display records from my database in my AB application. All the need code to make this happen in AB. The data from the JSON encoded from my test.php show me how to display, update and delete it in AB. I looked at the sample in AB but dazzels me don't know why its working... Thanks in anticipation.
MA

Asley Cruz
Ok bro, I have codes to insert, search, delete, update using PHP (in my server) with AB, loading data into a Report. I got this codes because I am doing a bible for my Android. Give me a couple a days to do simple samples separately for you. Hope you are not in a hurry because of my work.
AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


Michael Adesegun
Oh! bravo, thanks Asley, I will wait on you till you finish. Am also designing a bible app for IOS too. I could do that completely as a Mobile Web App in php and port it into AB. The bible txt I have is Excel and Txt format. wanted to transfer it into MySql DB.
MA

Asley Cruz
Michael by the way, if you want, you can have a look my website to see some of my services and my two apps made in AB and give them a try from Google Play. This in case if you want me to work for you (in a future) in some project as a freelancer. Hope you can finish your project for iOS.
AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


Michael Adesegun
I have looked at your website, it looks very great, especially your laudable works in Windows Platforms, I download 2 of them already to try out. I didn't know you have AB apps up there. I will check it right away. Will revert back to you. Thanks good job!
MA

Michael Adesegun
Very Nice App you mean this is built with AB, unbelieveable. Expecially the AC Quotes it is awesome... I must know how to use AB better...
MA

Asley Cruz
Thanks Michael, and of course, in time you will learn more AB, like a pro
AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


Asley Cruz
Hi Michael, Sorry for the delay, working in your samples. Day won't end without sending you the downlod link.
AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


DecSoft
Thanks for your efforts, Asley! :-)

Asley Cruz

Hi Michael, here you go the files.

Change the URL on every HTTP controls and the BDD name, user and password in every PHP file for your BDD on your server.

https://asleycruz.com/SampleBDD.rar

Tested in a BDD with 3 columns, id, name, age.

Hi David, the genius :P


AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


DecSoft

Hello to all,

Thanks for your work and for share it with us, Asley!



Michael Adesegun
Thank you so much Asley for your efforts; and I quite understood the process, even though it hasn't worked. I seems clearer that the sample bundled in the AB. I have done everything that is needed to make it work. created a Database, table_test and had 3 column setup and even inserted a row of data from phpmyadmin and connected all dots. but i still get alert box saying Can not Update etc. However, I immensely appreciated your efforts and the bid to help me get through these.
MA

Asley Cruz
The solution locally is: Open your browser with the path of your AB project already compiled
(I use WampServer but the project I sent you, was tested online and it worked.):
  • localhost/SampleBDD/SampleBDD_Compiled/www/
Don't run your AB project with AB app or with the path in your browser (it didn't work for me this way):
  • http://127.0.0.1:3333/
Remember Michael, if your Report control has the Wrapper in "Grid", within HTML option you must have
but if the Report control has the Wrapper in "Table", within HTML option you must have

AsleyCruz.com

Graphic & Web Designer


My app: AC Biblia

My game: AC Trivlia


DecSoft

Hello to all,

Asley is right: remember that the AB internal debugger / HTTP server don't support PHP, so, if we want to use a PHP script, we have two possible ways: move the compiled app into an HTTP server that support PHP, so we can use local paths for the required PHP scripts. Or the other possible way: provide the right URLs for the required PHP scripts, so the app can run in the internal debugger / HTTP server, but the PHP scripts run in a HTTP server with PHP support. In both ways we can get it working.


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.