How to Add Message and Confirmation Boxes Using JavaScript?
Answer / 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 |
sample code to auto focusing the first field in a form
code to sorting an array of objects
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: <SCRIPT LANGUAGE=javascript> function calSubmit_onclick() { var xyz=0; .......... .......... document.write("<lable>"+xyz+"</label>"); /*Is it possible*/ }
Code to Block submission of form by pressing Enter Key
how to Auto Scroll the page
how to copy form data between different pages
Reading which Character Key was pressed
how to create Expandable and Collapsible Menus
create a slide show
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space:
how to pass data between pages using URLs
how to get the User's Time of Day