Posts by DecSoft

Show threads by DecSoft
3403 posts found, page 102 of 227

DecSoft (In thread: CORS issue in an HTTP Client control)

Hello Peter,

Apparently it's a CORS issue. If you try your sample in Firefox, for example, with the Console Developer opened, you can see that it's a CORS issue. The server side must set the appropriate CORS headers to allows the request from the app.

Depending on the server that you are using or the language that you are using, you can establish the CORS permissions. This website may can help you.

P.S. Probably you no need to use the "HttpSetHeader", but, this is not related with the CORS issue.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

No problem! Always thanks you for your support. I am happy to help when possible. :-)


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

If you can figure out how to display the find results in the record then I may stick with PouchDB. [...]

Ok. I sent to you right now your sample a bit modified in order to get the "find" method working. I add a new view "Find" to the app, and a button from the first view that goto the new "Find" view. Once you goto that view, press the "Find" button. Take a look at that button's Click event for the code: I remove something that apparently is not needed.

But more important! The ".then" callback receives two arguments: the first one is "doc", and the second one is "error"... but you change the order of these arguments! For that reason you can't get it working... note also how we can assign the "doc.docs" array variable to the "Report.Data" variable, in other words, we no need to iterate the "doc.docs" array... except if need to do it for some reason.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello again!!

Thinking about what you wanted to do... apparently PouchDB can synchronize a database, but, my question is, they can do this in an "authomatic" way? If so, how they can do that? Using HTTP calls in a pool like I suggest above? This part is not clear to me... In other words, if you finally must to call to the synchronize method, why don't call in the same moment to your server, just to get the latest cart's items? Do you understand what I mean with this paragraph Peter? Please, post here if not... maybe I did not explain well!


DecSoft (In thread: Some help around certain Javascript syntax)

Hello again,

Just to mention something... before the WebSockets availability, there a more or less "common approach" to establish a "pool" with the app's server, that is, you can ask to the server if some new cart's items are available... or just that send to the app the existing cart's items..., and, if needed, you can also do it in a "Timer", that is, in certain intervals of time. A WebSocket is more elegant, of course, however, they requires a dedicated hosting, and, not everyone have something like that available to use.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Just about the possible approach using another server's database, maybe more details are needed in order to decide if we can use "just" HTTP Clients (and HTTP calls) or if we need something more like a WebSocket server. This last allows to establish a bidirectional connection between the app and the server, and, allows to the app to receive information in real time, that is, by server demand.

So yes; certainly a WebSocket can do something like that... but I am not talking that there is something easy, maybe can be more easy than appear. On the other hand, a WebSocket server requires a dedicated hosting, and, I don't know if this can be suitable for you or not.

Said that, maybe we can avoid the usage of a WebSocket, just by consider various things, of course. We can start to know that the app's have an "Online" / "Offline" events, thant may we can use. So we can imagine that an user add an item to a shoping cart, and, if they are online, the app can made just an HTTP call to the server sending the cart' items, for example.

Once that is doing, any other app can "request" the cart' items to the server, of course. I feel that I place here just some few words, probably we must consider other things too, but, certainly probably it's possible to use the local storage in combination with a "traditional" server's database (any one, MySQL, PostgreSQL, Oracle or any other, since we made HTTP calls, and receive JSON (for example) the app is completely abstracted about the server's language nor database.

You can try to start with that approach, Peter, and, as now, we can try to help you in some specific problems. On the other hand, this do not mean that we end with PouchDB, that is, the problem right now is that I can see the app that you zipped without errors, so, I can't see what can / must be solved... if possible...


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Don't get frustrated... it's quite normal that the things requires more work that we expected at a first view... I am testing your zip / project, and, there is no errors right now! You told me that I must try the "remoteSync_Find_Report" function, but, finding it in the app they appear not used? So where you want to use that function?

On the other hand, but, not to get you more frustrated... may you can also consider other possible approach... maybe the local storage is enough for your "offline" requirements? Because if so, maybe you can deal directly with the local storage... and prepare some server's script to synchronize the data... I am imagine in another kind of database like MySQL, etc.

Again, this is not to desanimate you, but, maybe we are trying to kill flies with cannon fire? I don't know...


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Since the screenshot shown a similar array than the first example... maybe you need to use the same code? Remember what is the main point: we must assign to the Report.Data variable the "docs" array... in fact, right now I am not sure why we iterate (at least in this last case), that is, maybe something like than the below is enough:

Remember: the Report's Data variable expect an array of objects, that is, the objects that the Report must be shown, as you know, every object in the array is a record in the Report.


DecSoft (In thread: The order of the forum's threads)

Hello Paolo,

Your're welcome! In fact you are completely right... that is, the "updated" order have more sense than the "date" order. At least in the cases that we are talking about!


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Don't worry... maybe I am wrong... (definetively I must go to the bed and tomorrow I can take a look in a better way) but apparently the errors appear just when the "pouchdb.js" and the "pouchdb.find.js" files are added to the HTML document... that's rare... because in principle we don't start to use the stuff of that files... and the errors appear... but anyway, I want to take a look tomorrow morning: maybe I am missing something...


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Please, no apologies! But we have a problem here,... let me to try to explain. If you run the app, and, scroll up the console... you can see a couple of error messages caused in the "pouchdb.js" file ("fetch" are not defined) and the "pouchdb.find.js" file ("Headers" are not defined).

The above errors are fatal, at least one of them... anyway both of them must be solved. Why? Because certainly the app can continue running, however, at some moment (not only in the Notes view) we can see another error... "PouchDB" is not defined... and this last error is probably a consequence of the first ones...

How to solve the errors? Honestly I don't know right now... maybe because it's too late, but, in fact because the errors are caused in Javascript files that, in principle, must no contain any problem... at least just by included it in the HTML document like now...

Maybe you can search a bit from the error messages, around the PouchDB database, something like search in Google "fetch is not defined pouchdb.js"... I will try to continue help you tomorrow, Peter, but, certainly this what I can say right now...

Maybe you need to upgrade PouchDB and the used plugins?


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

The link of the AB file appear wrong... but anyway, what I need is the AB file and the required app's files, that is, the used images, scripts, etc. Just like try the app here in my PC like you in your computer!


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

I can try to take a look at the compiled files, but, I ask you for the project file (the AB file... and the required images, etc.) in order to try it here in AB. If you don't want to share here the link, just send me the files or the link to my E-Mail, Peter.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello again,

On the other hand... are you change the Report's HTML variable? That is, according to the records that the Report must shown... someting like "Record.note" and "Record.title"... if I am not wrong...

Anyway, send to me the project file, Peter, and I will take a look.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Yes; I am not in my PC right now... but please, sent to me the project file... so I can take a look here as quickly as possible. :-)

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses cookies only to store your preferences.

Ok! Hide this note More information