Joomla implementation

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

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'); ?>
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
	<div class="dhx_cal_navline">
		<div class="dhx_cal_prev_button">&nbsp;</div>
		<div class="dhx_cal_next_button">&nbsp;</div>
		<div class="dhx_cal_today_button"></div>
		<div class="dhx_cal_date"></div>
		<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
		<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
		<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
	<div class="dhx_cal_header">
	<div class="dhx_cal_data">

I obtain no errors but i see nothing

Someone can give me a tip?


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.


The very first line of Joomla’s output is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> 

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.




OK - so changing the doctype in the template works, but I’d rather not do that :frowning:

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:

<style type="text/css" media="screen"> html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; } </style>

So the original prognosis was correct - it’s a CSS issue. Sorry for the noise :wink:

To make things a bit more clear :slight_smile:
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.

Hi, thank you for the explanation, now everything seems more or less clear