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
maximizing the main window
code to keep a page Out of the browser history
Create a Menu that can be activated while clicking on Right Mouse button
code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc
determine which Element received an Event
code to detect availability of cookies
Code to Block submission of form by pressing Enter Key
code to get the coordinates of a Click Event
how to Scroll a DIV content
code to positioning of window in certain dimensions
how to copy form data between different pages
how to pass data between pages using Cookies
how to get the User's Time of Day
how to create Expandable and Collapsible Menus
Create a ViewState Property?