PILNE!
Mam taki skrypt:
<script type="text/javascript"> //rezerwacje.html?checkRoomStatus=check&day=8&month=5&year=2015&roomId=6
function getSearchParameters() {
var prmstr = window.location.search.substr(1);
return prmstr != null && prmstr != "" ? transformToAssocArray(prmstr) : {};
}
function transformToAssocArray( prmstr ) {
var params = {};
var prmarr = prmstr.split("&");
for ( var i = 0; i < prmarr.length; i++) {
var tmparr = prmarr[i].split("=");
params[tmparr[0]] = tmparr[1];
}
return params;
}
var params = getSearchParameters();
var ddl = document.getElementById('roomId');
function CheckAndModify(id)
{
var xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState===4 && xmlhttp.status===200) {
//alert(xmlhttp.responseText);
if (xmlhttp.responseText == "true")
{
ddl.options[id].style ="display: none;";
ddl.remove(id);
}
}
}
//alert("rezerwacje.html?checkRoomStatus=check&day="+params['day']+"&month="+params['month']+"&year="+params['year']+"&roomId="+ddl.options[id].value);
xmlhttp.open("GET","rezerwacje.html?checkRoomStatus=check&day="+params['day']+"&month="+params['month']+"&year="+params['year']+"&roomId="+ddl.options[id].value,true);
xmlhttp.send();
}
for (i = 0; i < ddl.options.length; i++) {
//alert("found:"+ddl.options[i].value);
CheckAndModify(i);
}
Nie chce mi ukrywać wszystkich zarezerwowanych elementów
Błagam o pomoc