
Matthew you're completely screwing your code. that javascript line doesn't doesn't help much and still trying clientside evualation

.
where comes this newdata from?
Assuming the server returns update or noupdate. we can than return to the switch statement
switch(response) {
case update:
document.getElementById('bar').innerHTML = response;
document.getElementById('bar').style.color = "red"
break;
default :
document.getElementById('bar').innerHTML = response;
document.getElementById('bar').style.color = "yellow"
}
when done that you can return your whole string and do a substring search for noupdate