Dhi

[ Note that this page will redirect to one level up, in…
47 seconds ]

This Dhi object demo page shows:

  • Usage of an eXportable that is pre-initialized with a Dhi
    — see eXportables definition in the python source for the
    Specials Types Directory, and compare
    the initial Dhi there with the final Dhi, displayed below,
    that this page is rendered with.
  • Usage of how the page adds to the various attributes of the Dhi
    — see content sub-template for this page.
  • Usage of how other objects participate to building up the Dhi
    — see the site template that adds a Collapsable Gizmo object for
    displaying the content sub-template for this page.
  • Sample usage of the infrequently used
    meta and http-equiv attributes.
  • How the Dhi controls the generation of the HEAD element.
  • How the Dhi guarantees that a DHTML document has at most
    one <script> and at most one <style> element
    inlined within the document HEAD.
  • How the Dhi elmininates the need of any <script> or
    <style> tags interspersed within the document BODY.

The Dhi, in the state that it is in at this stage of page
processing
, is displayed here. Notice that as the
Collapsable Gizmo that the page template renders later
does not yet show up — but this is OK as the Dhi, and the HEAD
element, are always rendered last, meaning that the Dhi for a page
may be added to until the very end of content rendering.

{

‘body_attrs’ : {

},

‘css_codes’ : [

‘.bb { border: 3px dotted blue; }’,
‘.bg { border: 2px dashed green; }’,
‘.by { border: 3px dashed yellow; }’,
‘.br { border: 2px dotted red; }’

],

‘css_files’ : [

],

‘gizmos’ : {

},

‘http_equiv’ : {

‘refresh’ : “60;url=’.'”,

},

‘js_codes’ : [

‘var kount=0;’,
‘var initial_body_klass;’,
“var klasses = [‘bb’,’bg’,’by’,’br’];”,
“\nfunction get_body() { return document.getElementsByTagName(‘body’)[0]; }”,
‘\nfunction mod(divisee, base) { \n return Math.round(divisee – (Math.floor(divisee/base)*base)); }’,
“\nfunction set_body_klass() {\n get_body().className = initial_body_klass+’ ‘+klasses[mod(kount, 4)];\n kount += 1; \n window.setTimeout(‘set_body_klass();’, 1000); }”,
“\nfunction set_countdown() {\n var cd = document.getElementById(‘countdown’);\n cd.innerHTML = (60-kount);\n window.setTimeout(‘set_countdown();’, 1000);\n}”

],

‘js_files’ : [

],

‘meta’ : {

‘description’ : ‘dhtmlinfo object test page’,

},

‘onload_actions’ : [

‘initial_body_klass = get_body().className;’,
‘set_body_klass();’,
‘set_countdown();’

],

‘x’ : {

‘allow’ : None,
‘attribute’ : ‘dhinfo’,
‘component’ : ‘dhi’,
‘crumb’ : ‘Dhi’,
‘dhi’ : <gz.fill.dhi.Dhi object at 0x8533cac>,
‘slashed’ : False,
‘title’ : ‘Dhi’,

},

}