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
how to create a Draggable element
write a code to generate pseudorandom numbes
program to show a progress bar
how to create an anonymous function
code to Hide and Show form controls
how to convert between arrays and strings
code to positioning of window in certain dimensions
code to get the coordinates of a Click Event
code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc
how to copy form data between different pages
Code to Block submission of form by pressing Enter Key
How to block double clicks
maximizing the main window
communication between main window and new windows
determine which Element received an Event