Hi, I am trying to use DHTMLX capabilities on Joomla
(i place here, because i think it can be used for other diferent products than schedule one)
i did a component for test,
I copied the codebase directory on the component dir
I also copied common/events2010.xml on the component dir
and i wrote onload=“init();” on the body tag
then
on the view, i left empty the view.html.php file
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport( 'joomla.application.component.view');
/**
* HTML View class for the ScientificPublications component
*/
class TestDHTMLXViewTestDHTMLX extends JView {
function display($tpl = null) {
parent::display($tpl);
}
}
?>
And finally on the default.php file i wrote:
<?php //defined('_JEXEC') or die('Restricted access'); ?>
and i wrote onload=“init();” on the body tag
I’m not qute sure , how it work in Joomla, but be sure that target page , rendered by joomla, still has such onload call. Because without it nothing will work.
The second possible issue is
style=‘width:100%; height:100%;’
Try to use fixed width and height instead of percents. Many Joomla’s themes will not work with percent based sizes.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I had the same problem as the original poster, but used ‘&tmpl=component’ in the Joomla URL to rip out must of the cruft, took the source of that as HTML, and cut everything down until all I had was the example code left over… and the doctype. Sure enough, I removed the doctype and BAM! Scheduler loads.
Any ideas? I’m posting the full code below that chokes - remove the first line and it works.
Minor update: the scheduler div needs a width of 100% and a height given in pixels. I’m not sure why removing the doctype had any effect - that was a red herring.
The example html I posted before works if you add:
To make things a bit more clear
When you are using page in XHTML mode ( doctype in your case ) - html and body elements will not have fixed height, but will auto-size to content. ( So body can be smaller than visible page )
If inner content has not fixed height ( size in percents doesn’t count as fixed height ) then html and body elements autosize to zero height - causing the problem in your case.