function ListOutSelectedSeats() {
var selectedSeats = document.getElementById('<%=hf.ClientID%>');
selectedSeats.value = "";
var grid = document.getElementById('<%=gvScreenLayout.ClientID %>');
for (i = 0; i < grid.rows.length; i++) {
for (j = 0; j < grid.rows[i].cells.length; j++) {
col1 = grid.rows[i].cells[j];
//col2 = grid.rows[i].cells[1];
var Level = grid.rows[i].cells[0].innerHTML;
var RowName = grid.rows[i].cells[1].innerHTML;
for (k = 0; k < col1.childNodes.length; k++) {
if (col1.childNodes[k].type == "image") {
if (col1.childNodes[k].src.toString().indexOf("images/design_seats/small_Avail.jpg") >= 0) {
var imgid = col1.childNodes[k].id.toString();
var ind = imgid.indexOf("ImageButton");
var Number = imgid.substr(ind + 11, 2);
if (isNumeric(Number) == true) {
Number = imgid.substr(ind + 11, 2);
selectedSeats.value = selectedSeats.value + "," + Level + "_" + RowName + "_" + Number;
}
else {
Number = imgid.substr(ind + 11, 1);
selectedSeats.value = selectedSeats.value + "," + Level + "_" + RowName + "_" + Number;
}
}
}
}
}
}
}
No comments:
Post a Comment