Problem save offline with mobile

Hello!I am new to dhtmlx ,scheduler and mobile :slight_smile:

I am testing the mobile version and I want to test the offline saving.

I was gone to the dhx.proxy documentation and using that code I wish to see how to programming my code to have an apps that save offline the data and when I return ‘in the network’,it will save those data on the DB.

This is the code I am using :

[code]

	<script src="../../codebase/dhtmlxscheduler_mobile.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxscheduler_mobile.css">

	<title>Data saving</title>
	<script type="text/javascript" charset="utf-8">
		scheduler.config.init_date = new Date(2012,4,1);
		var source;
		dhx.ready(function(){
			source = new dhx.proxy({
  					url: "events.php",
  					storage: dhx.storage.local
			});
			dhx.ui.fullScreen();
			dhx.ui({
				view: "scheduler",
				id: "scheduler",
				save: "events.php",
				url: source,
				datatype: 'scheduler' 
			});
			$$("scheduler").load("events.php","scheduler");
		});
		
		var dp = new dhx.DataProcessor({
				master:$$('scheduler'),
				url: source
		});
	</script>
[/code]

and

[code]<?php
include (’…/…/codebase/connector/scheduler_connector.php’);
include (’…/common/config_mobile.php’);

$res=mysql_connect($server, $user, $pass);
mysql_select_db($db_name);

$scheduler = new schedulerConnector($res);
//$scheduler->enable_log("log.txt",true);
$scheduler->render_table("events_mobile","event_id","start_date,end_date,event_name,details");

?>[/code]

The problem is that I receive these errors at runtime:

Uncaught TypeError: Cannot read property ‘name’ of undefined dhtmlxscheduler_mobile.js:264
Uncaught TypeError: Cannot read property ‘local’ of undefined data_saving.html:16

Why???
Where is my error???

I wait for your answer.

Thanks a lot!!! :slight_smile:

I solved a piece of problem…
It was my mistake…

I insert in the right place the dataProcessor :

[code]

	<script src="../../codebase/dhtmlxscheduler_mobile.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxscheduler_mobile.css">

	<title>Data saving</title>
	<script type="text/javascript" charset="utf-8">
		scheduler.config.init_date = new Date(2012,4,1);
		var source;
		dhx.ready(function(){
			source = new dhx.proxy({
  					url: "events.php",
  					storage: dhx.storage.local
			});

			dhx.ui.fullScreen();
			dhx.ui({
				view: "scheduler",
				id: "scheduler",
				//save: "events.php",
				url: source,
				datatype: 'scheduler' 
			});
			
			$$("scheduler").load("events.php","scheduler");
			
			var dp = new dhx.DataProcessor({
				master:$$('scheduler'),
				url: source
			});

		});
		
				</script>
[/code]

Now I only have this error:

Uncaught TypeError: Cannot read property ‘local’ of undefined data_saving.html:16

Someone has an idea??? :unamused:

Hello,

offline functionality is not released yet. Could you please create the ticket in the Members’ Support.

Hi!
ok…?!?..but only for info,why there is already a ticket here discussing about ‘saving on mobile’…???

viewtopic.php?f=24&t=20521

it was write in 2011…

And also ,do you know when the ‘save offline’ will be release?

Thanks and regards.

grubby69

…sorry but I am not a licensed user and I think I cannot submit member Support ticket…or not??
…I am new and I am using the free scheduler… :slight_smile:

sorry but I am not a licensed user and I think I cannot submit member Support ticket…or not??

Yes, only licensed users can submit tickets.

The latest official version of mobile scheduler doesn’t provide offline support. The new version will be released in June.