function problem

There is my code :

html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
<script type="text/javascript" charset="utf-8">

   var myWins, myForm;

function getUrlVars() {
	var vars = {};
	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
    vars[key] = value;
		});
return vars;

}

	function init() {
	
		
		scheduler.config.xml_date="%Y-%m-%d %H:%i";
		scheduler.config.prevent_cache = true;
		
		scheduler.locale.labels.map_tab = "Carte";
                 scheduler.locale.labels.week_agenda_tab = "Agenda";
                 scheduler.locale.labels.month_tab = "Mois";
                 scheduler.locale.labels.week_tab = "Semaine";
                 scheduler.locale.labels.day_tab = "Jour";
		scheduler.locale.labels.section_location = "Location";
		scheduler.xy.map_date_width = 180; // date column width
		scheduler.xy.map_description_width = 400; // description column width
		
		
		scheduler.config.lightbox.sections=[	
			{ name:"description", height:70, map_to:"text", type:"textarea", focus:true, button:"fiche"},
			{ name:"location", height:70, map_to:"location", type:"textarea"  },
			{ name:"time", height:72, type:"time", map_to:"auto"}	
		]
		
		scheduler.config.map_inital_zoom = 8;
		var id = getUrlVars()["calendar_id"];			
		scheduler.init('scheduler_here',null,"month");
		scheduler.load("php/events_map_view.php?calendar_id="+id);

		scheduler.attachEvent("onEventCreated",function(id){
   		var myid = getUrlVars()["calendar_id"];
                 scheduler.getEvent(id).calendar_id=myid;
                 //alert(id);

	});
		
		scheduler.locale.labels.button_fiche="Ouvrir Fiche RDV";
                 //scheduler.form_blocks.textarea.button_click=showButtonContent();
		scheduler.form_blocks.textarea.button_click=function(){
         		alert();
		
		
		}

		//function showButtonContent(){
		//var myWins;
		//myWins = new dhtmlXWindows();
     		//w1 = myWins.createWindow("id", 800, 50, 700, 560);
     		//w1.setText("FICHE RDV");
     		//myForm = w1.attachLayout("2E");
     		//myForm.cells("a").hideHeader();
     		//myForm.cells("b").hideHeader();
     		//myForm.cells("b").setHeight(140);
     		//myForm1 = myForm.cells("a").attachURL("xbp_form_crud/index.php");
     		//myForm2 = myForm.cells("b").attachURL("xbp_form_crud/index2.php");
     
   //}



		dp = new dataProcessor("php/events_map_view.php?calendar_id="+id);
		dp.init(scheduler);
				
	}

		

</script>
 
 

I would like to show my Showbutton function instead of the call alert:

scheduler.form_blocks.textarea.button_click=function(){
alert();

but I do not know how.
Thank you in advance for your help

Hello,

Uncomment your function and use
scheduler.form_blocks.textarea.button_click=showButtonContent;
Please note that there are no “b[/b]” here as we are assigning function itself, not the results.

Kind regards,
Ilya

thank you for your help.

I did what you told me but when I click on the button “Ouvrir Fiche RDV” it nothing happens?
Where does the problem?