save_lightbox() open an alert!

Hello,

I’m using the save_lightbox() command for a custom button but this open an empty alert…
Is there a way to avoid that?

[code]scheduler.attachEvent(“onLightboxButton”, function(button_id, node, e){

	if(button_id == "print_odj"){
		
		var event_id = scheduler.getState().lightbox_id;
	
		document.getElementById('cloture').value='1';
		document.getElementById('idprint').value=event_id;
		
		scheduler.save_lightbox();
			
		document.getElementById('printform').submit();
				
	}
});[/code]

Hello.

Do you have alert after save_lightbox calling? It seems like it shouldn’t show any alerts. Possibly you have any onAfterLightbox, onEventSave, onEventAdded or onEventChanged handlers.

I’ve checked all those and put a security with:

[code]

	if (document.getElementById('cloture').value=='0') {[/code]

But nothing change…
The mystery is that alert is containing no text but all my alerts are with text …

Do you have an other idea?

Do you have such alert only after code changes?
Empty alert can appear if server answered with empty response (It shows response text). In this case, try to set scheduler.config.ajax_error = false. If alert doesn’t appear after that, you have some problems on the server side.
See article:
docs.dhtmlx.com/scheduler/api__s … onfig.html

Thank you Sten…
I don’t use ajax on this but html form sending.
Anyway,It’s not a really clean solution but the command scheduler.config.ajax_error = false; is ok for me and bypassing the problem…

So, Thank’s for your job!!!