[RESOLVED] [2005] Get Attributes ID from ASP.NET to Javascript
Hi,
I have created a list of input delete buttons in server side eg.
<input type="Button" value="Delete" id="DeleteButton" >
I want to put confirmation but somehow I need to pass in 1 value from server side in order for me to process? Any suggestion on how should I go about doing that?
var confimDelete = confirm("Confirm delete?");
if (confimDelete == true) {
window.location.href = "AnotherForm.aspx?ID=" + howtoretrievefromServer();
} else {
window.event.returnValue = false;
}
Re: [2005] Get Attributes ID from ASP.NET to Javascript
When you call this javascript function, pass the ID.
onclick="ConfirmDeletion(theIDofTheItemYouAreDeleting);"
Then use that in your window.location.href.
Re: [2005] Get Attributes ID from ASP.NET to Javascript
lol, this works well and it only uses 1 function. I think until so complicated :) Nevertheless, thanks for your help :)
Re: [RESOLVED] [2005] Get Attributes ID from ASP.NET to Javascript
Not sure I understood, did that solve your problem or give you an idea as to what you can do to fix the problem?
Re: [RESOLVED] [2005] Get Attributes ID from ASP.NET to Javascript
I use ur code to solve my problem :)