<progress id = "progressBar" max = "100" value = "%! port-adc2"></progress>
02-06-2013, 07:56 AM
I didn't read it all, but it seems, that it should execute a pre-defined function, if it finds the %! symbol combination. I don't know, why it doesn't work. Maybe try to omit the doublequotes or make a space after it, so the %! stands alone surrounded by whitespace. Or maybe it will do it only once on the page. However, they encouraged that meta-tag approach, too. It appears, you can even omit the URL part and it will refresh itself. Did you try the JS method with setTimeout line?
02-06-2013, 08:18 AM
yes i have tried with setTimeout line but then the links on the webpage doesnt work. my webpage sends data to the circuit by these links. with the settimeout line the page refreshes and these links doesnt work.
by the way i have learned ajax alittle bit, and edited the code like below:
after the first click on the chage buton the progress bar disappears and doesnt go back?
02-06-2013, 09:14 AM
Ok, if there's some more stuff on the page, then probably AJAX is the way. I'm guessing trouble with adc.shtml, what are the exact contents of it? If it is a whole webpage with headers and stuff, that might be the culprit. By using innerHTML you force the browser to parse again all the contents of it. If you want to add just text, you should go with nodeValue: