Welcome Guest, Not a member yet? Register   Sign In
how to delay?
#7

(This post was last modified: 11-16-2020, 03:18 PM by includebeer.)

(11-16-2020, 08:28 AM)richb201 Wrote: The ajax is embedded in the Grocery Crud code which I don't have access to. I agree with you, a 1 second delay is not the best thing in the world, but it surely is better than an error.

Maybe there's a way to define a callback function that Grocery Crud can call when the request is finished. But I don't know. I never used that.

(11-16-2020, 08:28 AM)richb201 Wrote: How about my CI code? Is the php being converted into something that is running in the client's browser?

No, all CI and PHP in general is running on the server. Only JS run in the browser.

(11-16-2020, 08:28 AM)richb201 Wrote: If the delay is on the user's PC, no biggie. If it is on the server, that would not be good.

If you can't find a way to define a callback function, you can always set a timer to call the backend again if it's not working the first time. Maybe try 3 times at a 500ms interval then stop and display an error. It's dirty but it's better than a 1 second delay.

Edit: I forgot, do this in JS, that will run in the browser.

(11-16-2020, 12:44 PM)InsiteFX Wrote: You do now.

GitHub - Grocery CRUD

Editing the code of third party libraries is rarely a good a idea.
Reply


Messages In This Thread
how to delay? - by richb201 - 11-15-2020, 07:13 PM
RE: how to delay? - by includebeer - 11-16-2020, 05:15 AM
RE: how to delay? - by richb201 - 11-16-2020, 07:07 AM
RE: how to delay? - by includebeer - 11-16-2020, 07:27 AM
RE: how to delay? - by richb201 - 11-16-2020, 08:28 AM
RE: how to delay? - by includebeer - 11-16-2020, 02:42 PM
RE: how to delay? - by InsiteFX - 11-16-2020, 12:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB