tags:

views:

119

answers:

2

I would like to add a link in my javascript messagebox function. Is there a way to do that?

TodayDate = new Date();
if (sender._selectedDate < new Date(TodayDate.getYear(), TodayDate.getMonth()-1, 1)) 
{
alert("Only current and previous months active.\n\nPlease visit\n
Agency ...HOMEPAGE...\nfor Archive Commissions");
sender._selectedDate = new Date();
}
+6  A: 

No, this is not supported. You need to create your own modal dialog using an absolutely-positioned DIV.

Diodeus
Or better yet a fixed position div. Besides: native dialogs are sooo ugly.
annakata
+2  A: 

A javascript framework, such as jQuery, makes this a relatively easy task.

There are several jQuery plugins that allow you to create a div with your dialog content on the page, and that div becomes a JavaScript dialog when the show dialog event fires. They can be easily styled, and also most include pre and post event callback functionality

Mark Struzinski