Facebook Twitter Gplus LinkedIn YouTube Google Maps RSS
Home Posts tagged "javascript" (Page 2)
formats

Javascript..Confirmation on button click

Return value of javascript confirmation popup button click.

- Puts value into textbox to be reviewed in code behind to verify which button was clicked.

<input type=”hidden” id=”AnsTextBox” runat=”server” />

<script language=”javascript” type=”text/javascript”>

function getVerify() {

var agree = confirm(“Do you want to delete this row?”);

if (agree)

document.getElementById(‘<%=AnsTextBox.ClientID%>’).value = ‘True’;

else

document.getElementById(‘<%=AnsTextBox.ClientID%>’).value = ‘False’;

}

</script>

Do this ‘OnClientClick’ event.

Check for the value of Hidden field in Code behind in the ‘OnClick’ event. Chimple..

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
© All rights reserved to Cyberbrutus. 2012
credit

Switch to our mobile site