Hi all,
I'm trying to write a script that is kind of like a battle system, for an RPG Maker website.
For this script, ajax reloads periodically so that when 1 person does something on the page, the other can see it happen too.
I use javascript to create a PNG animation. The issue is that when the page reloads, I need to call that javascript function within the php file which is being accessed by ajax, so the animation plays for the user who didn't click anything. The issue is that I can't call functions (apart from when using onclick) to run in the ajax file, and after googling it says this is impossible anyway. Apart form using eval, which i also couldn't get to work anyway(though apparently is slow and a security risk).
So I'm wondering if there are any solutions to this. All I really need to do is run some javascript in a file being called by ajax. Any ideas are welcome..
Thanks in advance,
Mark.