How to Add Message and Confirmation Boxes Using JavaScript?
Answer Posted / guest
public void AddConfirmMessage(WebControl ctl, string
message)
{
ctl.Attributes.Add("onclick", "if ( ! confirm( '"
+ message + "' )) return false; ");
}
public void AddPopupMessage(WebControl ctl, string message)
{
ctl.Attributes.Add("onclick", "alert( '" + message
+ "'); ");
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
communication between main window and new windows
Reading which Non-Character Key was pressed
how to create a Draggable element
Code to Block submission of form by pressing Enter Key
how to pass data between pages using Frames
write a code that user can choose/alter Body Text Size
advance the focus to next consecutive fields when Enter Key is pressed
determine which Element received an Event
how to create a Custom Scrollbar
snippet to prevent submission of form when certain/any validations got failed
code to sorting an array of objects
code to get the coordinates of a Click Event
code to positioning of window in certain dimensions
how to pass data between pages using Cookies
code to set the main window's size