My codes are like this.
function deleteAction(obj,tableName){
inputs=obj.parentNode.parentNode.getElementsByTagName("input");
newValues="";
for(i=0;i<inputs.length;i++){
newValues+=inputs[i].value+",";
}
url="http://localhost:8081/SimpleWeb/SimpleServlet?action=delete&tableName="+tableName+"&newValue="+newValues;
window.location.href=url;
}
I have made sure that that function will be run when I click on the button with Chrome's debug.
And the string url is valid because I can copy it to the browser and open the page correctly.
But in this function the window.location.href
just doesn't work even if I change the url into "http://google.com"...Why
is
i
variable global? After looking well, I suggest you change from thisto