vkiryukhin/Smartupdater — Issue #5: POST sends the same data repeatedly instead of reading the variable.
Author: zurt
Created: 2011-11-22 07:05:30+00:00
State: open

Hi,

Tried using Smartupdater in a project and ran into a problem where the data is set with a variable but the form only ever send the first value.

```javascript
var counter = "1321932150"; // counter is set to some time.

$("div#content").smartupdater({
type: "POST",
url : "/controllers/ping.php",
data: {timestamp: counter},
dataType: "text",
minTimeout: 3000
}, function (data) {
counter = data; // counter is set to the time returned back by the server
}
});

```

The problem is that when I inspect the POST values on the server side, the same initial value is continually sent over and over.

Any ideas why that would happen? I thought it might be a variable scope problem but I'm pretty sure that counter is a global variable.

Thanks
Kurt