search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

DayPilotScheduler Message

Asked by Jimmy
14 years ago.

With the DayPilotCalendar you are able to call the .Message function on the client side, that will display the little red message in the top left-hand corner of the control.

This function isn't support by the Scheduler, and I've tried the examples in the Hotel Booking System but am constantly presented with an "object expected" error, even though the data message being passed by the CallBack exists.

I've tried:

function AfterRenderDayPilotScheduler(data)
{
if (data)
{
var message = new DayPilot2.Message();
message.hideAfter = 3000;
message.show(data, "message_warn");
}
}

And..

var message = new DayPilot2.Message("message");
message.hideAfter = 3000;

function afterRender(data) {
message.show(data, "message_warn");
};

Any pointers would be appreciated.

Comment posted by Jimmy
14 years ago.

Also, what does the following code below actually do (when used after the aforementioned .message code)? It is from a DayPilot tutorial, but is erroring on my production server:

if (data)
{
document.getElementById('messageDiv').innerHTML = data;
}

Comment posted by Dan Letecky
14 years ago.

The DayPilot2.Message class makes use of an existing element to show the message. In the tutorial, this piece of HTML is placed below the Scheduler:

<span id="message" style="padding:2px; display: none;" class="message_warn"></span>

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.