This my JS code:
$.when(d1, d2).done(function(v1, v2) {
var url = v1;
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
console.log(url);
}
};
xhr.send("deployment_preference_set_fleet_health_attributes_concurrent_hosts_percentage=31");
});
After certain processing I will get a URL which will be passed to v1
.
HTML Content of the corresponding URL
<input id="deployment_preference_set_fleet_health_attributes_concurrent_hosts_percentage" max="100" min="0" name="deployment_preference_set[fleet_health_attributes][concurrent_hosts_percentage]" size="3" step="any" type="number" value="30.0" />
% or less of the hosts in the fleet can be deployed to at a time.
What I want is to update the field deployment_preference_set_fleet_health_attributes_concurrent_hosts_percentage
with a particular value.
I have tried using xmlhttprequest but its not working.
Its working upto console.log(v1), but I think xhr.send () is not working since the page I am trying to update is not getting updated
Any suggestion of how update the data on that particular field.