Ok, fixed that. Duh, local wasn't throwing an error on attempting to array_merge an empty or error result. New version uploaded.
Hi, thanks, Ill give it a try. In fact only 2 people will be seeing it at the same time. Me and a colleague.
Hi, i just tested your code. Looks great but there is something wrong with imagesWithControls.php because when i hit next it goes next but jumps back to the previous image most of the times. Can that be fixed?
The most likely cause is a caching issue -- the update is reading a cached copy instead of the updated one. I'll see if I can find a way to play with cache-control to get around that -- either that or we have to disable the buttons and wait for the update to actually go through, then re-enable them. Could simply be that trying to mix the update and show routines into one isn't viable...
Doesn't have to be the whole page, just that one file. But I think a better approach would be to make the 'write' routine not update the current page -- I'm a bit busy now but I'll toss together a better demo. ... have a client from a decade ago come a knockin' on my door, having issues with their FINALLY upgrading to PHP 5.4 and they're hemorrhaging 'deprecated function' errors.
I just realized the possible conflict -- if you clicked on previous/next in the middle of a ajax request waiting, you'd have a set and get conflicting with each-other. I added a 'ignore' variable to ignore the current request (cancelling a request is a PITA) until after the SET goes through. Cleans up most of the issue. Though I'm still trying to figure out why the CSS animation is 'wonky' switching from 'forward' to 'back' and vice versa. I think it's because switching directions it's still set to previous instead of classless. -- edit -- nabbed the animation bug too. '.previous' was set to opacity 1, which is fine going single direction, but on revisit it needs to be zero. Setting it to zero breaks the animation unless you set up a delay on the transition... so changing it from: opacity:1; to: opacity:0; transition: opacity 1s 0; did the trick. 1 second delay, 0 transition time. Fixed bug free version uploaded to the same spot. Sorry for the delay.
Thank you pal! Seems to work BEAUTIFULLY now! I really appreciate your help. Im trying to understand the code so i can try doing it myself next time. Its kinda complicated to me.
Hi, sorry to disturb you yet again but seems like the jumpiness problem persists. Not all the times but quite often the current image still jumps back to the very first one. Could you please check it out? Im still unable to find the culprit. Thank you!
I'm unable to recreate what you describe right now... makes it hard to fix. Can I see your version to see what's going on?