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 |
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*/ }
Create a ViewState Property?
code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc
code to images to rollover
code to display a Countdown Timer (dynamic)
Code for Adding Message and Confirmation Boxes Using JavaScript?
how to delay a function call ?
how to pass data between pages using URLs
how to get the User's Time of Day
write a code to generate pseudorandom numbes
how to convert between arrays and strings
code to create a new window