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
program to bring a window to the front
Code to Block submission of form by pressing Enter Key
sample code to auto focusing the first field in a form
code to Hide and Show form controls
I have a doubt regarding including tags in a function.
I have written a function in javascript in a html page. The
function got called by clicking a button, i want to display
the results in same html page by placing tags in the
function. (this hmtl page is static page)
Is this possible?
example:
How to encode and decode URL strings?
code to detect availability of cookies
code to images to rollover
how to get the User's Time of Day
function to combine two or more arrays
how to create a Custom Scrollbar
code to get the coordinates of a Click Event
program to show a progress bar
how to pass data between pages using Cookies
write a code to generate pseudorandom numbes