Results 1 to 8 of 8

Thread: I'm doing a Periodic Update but it looks like Incrermental Update

  1. #1
    Join Date
    Dec 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I'm doing a Periodic Update but it looks like Incrermental Update

    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?

    The page can be seen here:

    Code:
    www.intellinexus.com/planetlab/spider.php

  2. #2
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    I don't really understand the script on that page, I tried it and got lots of googly code pop up in an alert box...

  3. #3
    Join Date
    Dec 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry I was trying to debug the code...I removed the alert boxes... You can have a look at it now...

  4. #4
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Thought I'd have a look to see if by some luck I could help, but I can't. Sorry.

  5. #5
    Join Date
    Dec 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh Its ok. I'll wait for someone to give it a shot... 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, as the php file generates a new image every few seconds, I want to update the corresponding figure on this page...

  6. #6
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    It makes sense, why not just make another request so the PHP spits out a new image immediately?

  7. #7
    Join Date
    Dec 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm afraid I didn't understand what you meant. Sorry about that...

  8. #8
    Join Date
    Jan 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hmm i had similer problems diferent but similer...
    i fixed the issue by calling the page with a unique string..

    so say i wanted to load page x in page y (stuff changes in page x regularly as its drawn from a database) i set all my refrences to that page as x?dummy=<the current date time-in asp its <%= now() %>>&anything else

    so basicaly to the browser it looks like a new "page" sounds stupid but its worked for me

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •