Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-24-2008, 12:13 AM #1
- Join Date
- Feb 2008
- Thanked 0 Times in 0 Posts
I'm doing Periodic Update but it looks like Incremental one
I have written a small script using prototype. I have two drop down boxes. The choices in the second one depend on the first one. So I use ajax to get the choices and populate the boxes. When the second box is selected, I wrote a function to initiate a Ajax.PeriodicalUpdater call to refresh a div tag every few seconds. So far, so good. Everything is working. I'm able to see an image(I displayed it) refresh itself.
Now, when I select another option from the second box, the new image is appearing but the old one is coming too. I mean, first the old one comes, then refreshes into the second one. I've been trying to get over this problem but in vain. Can someone please help me out? Just in case, my problem is something like:
Once I click on a submit button, I need to send the request to a php file which will give me an image file which i'm displaying. Now, I need to keep sending the POST data every few seconds so that the php file generates a new image and gives it back. This image should be displayed here on this page. The page can be seen here: