Initialize spreadsheet without database binding

Hi,

I’m trying to initialize spreadsheet without the database binding, since I want to allow users to work with multiple data sets. For that, I’m using custom PHP scripts that enable upload/download of JSON files.

The code I’m using:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		
		<title>Teste DHTMLX</title>
		
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlx_core.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxspreadsheet.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxgrid_shcell.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxgrid_borderselection.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_buffer.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_css.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_loader.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_config.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_headedit.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_mathhint.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_modal.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_selection.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_undo.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_context.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_export.js"></script>
		<script type="text/javascript" src="../Dhtmlx/codebase/dhtmlxsh_keys.js"></script>
		
		<link rel="stylesheet" type="text/css" href="../Dhtmlx/codebase/dhtmlx_core.css" />
		<link rel="stylesheet" type="text/css" href="../Dhtmlx/codebase/dhtmlxgrid_reset.css" />
		<link rel="stylesheet" type="text/css" href="../Dhtmlx/codebase/dhtmlxspreadsheet_dhx_web.css" />
		<link rel="stylesheet" type="text/css" href="../Dhtmlx/codebase/dhtmlxspreadsheet.css" />
		
	</head>

<body>
	
	<div id="folha" class=""></div>

	<script type="text/javascript">
		dhx_sh = new dhtmlxSpreadSheet({
			load: "../codebase/php/data.php",
			save: "../codebase/php/data.php",
			parent: "folha",
			icons_path: "../codebase/imgs/icons/"
		}); 
		
		var sheet="test";
		dhx_sh.load(sheet);
	</script>
	
</body>	

However, this is returning the following error:
Uncaught TypeError: Cannot call method ‘indexOf’ of undefined

All I get is a blank page. I know I’m doing something wrong, but what is it? Please help.

Thanks in advance

Hi,
unfortunately dhtmlxSpreadsheet doesn’t work without database.
To enable separated datasets for different users you may use option sheetid.