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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.