0

Hi

I have a small app, my first real ajax project, which gives you details for product availability, for each day. The user selects a day (from a calendar) and then a time slot within the day. The app then displays how many slots are available for purchase, on that day, for that time... I wanted to refresh the data, every 5s, to provide slick real time availability info... but alas, when you change day (look at another day and time), the old timer still runs with the old arguments, and so it keeps resetting the 'details' panel to the previous day's details...

how do I reset the timer? or delete the old one?

thanks
lworks

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by lifeworks
0

Ok, I seem to have solved it.

Its a bit of a hack, but its working.

I created a second function, which does the refreshing of slot details... it is not passed any arguments, but references some hidden text boxes... when you click on a new timeslot, it resets the values of the textboxes... and if there is no value, the loop stops because I put an if(x == '') checkpoint into the function that does the refreshing...

lworks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.