doOnLoad is not defined

I have add all the necessary files in my header, but even so I get doOnLoad is not defined in my console. What JS file creates this function?

These are the ones I’ve added in the header and when looking at the console they all get loaded properly, so I don’t know the problem:

<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxChart_v45_std/codebase/dhtmlxchart.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxForm_v45_std/codebase/dhtmlxform.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxCalendar_v45_std/codebase/dhtmlxcalendar.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxWindows_v45_std/codebase/dhtmlxwindows.js"></script>

doOnLoad function usually is defined in your html.
Please, share with a more detailed sample of your code.

HEAD:

[code]

<head>

<!--メタ 開始 -->
<link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/favicon.ico" type="image/x-icon">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<!---CSS--->
	<!---dhtmlx--->
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxChart_v45_std/codebase/dhtmlxchart.css">
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxForm_v45_std/codebase/dhtmlxform.css">
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxCalendar_v45_std/codebase/dhtmlxcalendar.css">
<link rel="stylesheet" type="text/css" href="<?php echo bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxGrid_v45_std/codebase/dhtmlxgrid.css">
	<!---TrackVia--->
<link rel="stylesheet" type="text/css" href="<?php echo bloginfo('template_url'); ?>/buyer_sales/trackvia.css">
	<!---highcharts--->
	

<!---SCRIPTS--->
	<!---jQuery--->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	<!---dhtmlx--->
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxGrid_v45_std/codebase/dhtmlxgrid.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxChart_v45_std/codebase/dhtmlxchart.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxForm_v45_std/codebase/dhtmlxform.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxCalendar_v45_std/codebase/dhtmlxcalendar.js"></script>
<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/plugins/custom_columns.js"></script>
	<!---highcharts--->
<script src="<?php bloginfo('template_url'); ?>/frameworks/Highcharts-4.1.9/js/highcharts.js"></script>





<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Keywords" content="Japan,souq,Japanese Product,trading,japan-trade-centre,jtc,bussiness" />
<meta name="Description" content="Japan Trade Centre is an exclusive business-to-business platform with capabilities to provide Japanese products and services for various needs in growing markets." />
<meta name="Copyright" content="Copyright(C) jtc ltd., All rights reserved." />


</head>

[/code]
BODY:

And then my grid div and the script to make the grid is in the body:

dhtmlx code is here...

You have:

it means, that when your html page is loaded the doOnLoad() function will be called.

Please, make sure that you’ve defined that function on your page.
Here you can find an example:
dhtmlx.com/docs/products/dhtmlxG … _grid.html

Thank you for your answer! What’s the importance of putting your grid in a doOnLoad function?

If your script for creating a grid is defined in the “head” of your html you need to call that script on loading the page. So that script should be in a function that can be called

[code]

[/code]

If the script is defined in the body of your html it will be called automatically on loading the html page.

[code]

[/code]

Neat! Thank you for the answer! Every day I learn more and more!