Another action on the event "onEventCreated"?

Hi!
On doble click I would like to show another window with my own form, I try with this code (the url of google is an example):

scheduler.attachEvent(“onEventCreated”, function(event_id,event_object){
window.open(‘http://www.google.es’);
return false;
});

This action show me the window with the url, it’s right, but in the scheduler appear the lightbox of Create New Task, I don’t want to show this form, how can I do it?

Zaida

Sorry for my bad english :unamused: I’m spanish, I hope you understand me!

Hello,

This happens because onEventCreated event is not blockable. You should use onBeforeEventChanged event.

Best regards,
Ilya

Great!!
Thank you Ilya!!!

Only one more little thing…How can I put a button “Create new event” in the scheluled? Next to the button Today for example. It’s possible?
Thanks! Regards

You can do something alike the following code.

Init function:

var add_event_btn = document.getElementById('add_event'); add_event_btn.onclick = function() { // custom logic }

Html part:

[code]



 

 













[/code]

Best regards,
Ilya

Thank you, thank you, thank you!!

Regards,

Zaida