Recovery value for storage in a scheduler

Here is my code :

<script type="text/javascript" charset="utf-8">

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.calendar_id = "Agenda";
		scheduler.locale.labels.section_location = "Location";		
		scheduler.xy.map_date_width = 180; // date column width
		scheduler.xy.map_description_width = 400; // description column width
			{ name:"description", height:50, map_to:"text", type:"textarea", focus:true },
			{ name:"location", height:43, map_to:"location", type:"textarea"},
			//{ name:"calendar_id", height:43, map_to:"calendar_id", type:"textarea"},				
			{ name:"time", height:72, type:"time", map_to:"auto"}
		scheduler.config.map_inital_zoom = 8;

var id = getUrlVars()[“calendar_id”];
dp = new dataProcessor(“php/events_map_view.php?calendar_id=”+id);


When I create an event, I retrieve the value of my schedule by calling (scheduler.getEvent (id). Calendar_id = '15 ';).
I’d like to replace the value (15) by the value of my schedule as for the call where I boot my calendar (scheduler.load (“php / events_map_view.php? Calendar_id =” + id);).
My problem is I can not do.
If I put the value (15) it works but I do not c how to scan the schedule itself that I am.
Thank you for your help and sorry for my English.

You are using

So the id - is the calendar id , right ?
so you can use

scheduler.attachEvent("onEventCreated",function(event_id){ scheduler.getEvent(event_id).calendar_id='15'; });

If I use (alert (id)) I’m an alert window that opens with the number of calendar on which I am.
Now I want it back so that when I take it getevent number of calendar on which I am.

Thank you .

Sorry, I have post the wrong code snippet, the correct one will be

scheduler.attachEvent("onEventCreated",function(event_id){ scheduler.getEvent(event_id).calendar_id=id; });