i have buttons arround 170 on page. , if button clicked color changed , stored id of button in java string array update in database.i can use hidden field accessing button id. if button id page refresh button of color changed. please give me solution problem please me
enter code here <script> <%int index = 0;%> //function call if buttons clicked function sub(id) { if (ss < pp) { if (document.getelementbyid(id).style.background == "") { document.getelementbyid(id).style.background = "#ff0000"; ss++; //hidden id of hidden tag... var val = document.getelementbyid("hidden"); val.value = id; //this java code.. in shall connect database , entry in db using update variable <% string[] update = new string[100]; if (request.getparameter("hidden") != null) { update[index] = request.getparameter("hidden"); } %> } else { document.getelementbyid(id).style.background = ""; ss--; } if (ss == pp) { if (document.getelementbyid(id).style.background == "") { alert("exceed!!"); } else { document.getelementbyid(id).style.background = ""; ss--; } } } }
Comments
Post a Comment