shoogar.js Test Page


  1. HTML CODE
  2. SHO.Ajax
  3. SHO.Browser
  4. SHO.Config
  5. SHO.Cookie
  6. SHO.Debug
  7. SHO.Element
  8. SHO.Event
  9. SHO.Script
  10. SHO.Style


HTML CODE

<head>
<script type="text/javascript" src="javascripts/lib/shoogar.js?ini"></script>
...
</head>

In the example 'shoogar.js?ini_demo' calls the configuration file 'ini_demo.js', which loads all necessary javascript and stylesheet files. Therefore in the HTML head no other script, style or link tags.

SHO.Ajax

See JSON Object


sho.ajax.loadJSON (JSON/PHP)
sho.ajax.loadJSON (JSON/Text)
sho.ajax.parseData (JSON/Text)
sho.ajax.parseData (XML)

JSON Object als Zeichkette anzeigen: Object.toJSON(http)


Beispiele:
http.id[0].Kreditkarte
http.id[1].Kreditkarte
http.id[0].Inhaber.Geschlecht
http.id[1].Inhaber.Geschlecht
http.id[1].Inhaber.Vorlieben.formatEnum()
http.id[1].Inhaber.Vorlieben.formatEnum()
http.id[0].Vorlieben[0]
http.id[1].Vorlieben[1]
format_as_money(http.id[0].Deckung) + " " + http.id[0].Währung
format_as_money(http.id[1].Deckung) + " " + http.id[1].Währung

SHO.Browser

sho.browser.flashInstalled
sho.browser.flashVersion
sho.browser.platform
sho.browser.name & .versionMajor
sho.browser.isIE
sho.browser.isFirefox
sho.browser.mode
sho.browser.isDOM2Event
sho.browser.availWidth;
sho.browser.availHeight;
sho.browser.scrollTop;

SHO.Config

p2.root
p2.conf
p2.cssAuto
p2.cssPatches
p2.js
p2.jsLib
p2.jsDev

SHO.Cookie

sho.cookie.create('font-size','12px','100')
sho.cookie.read('font-size');
sho.cookie.erase('font-size');

SHO.Debug

Press key # for document infos


sho.debug.benchmark(testfunc, 100000, [1,2,3]);

SHO.Element

SHO.Event

startSyncDemo(24);

startSyncDemo(23);

sho.event.disableSelecting();

sho.event.disableContextMenu();

SHO.Script

sho.script.loadFile(p2.jsDev + 'hello_world.js'); (Works with an empty script element)
sho.script.appendFile(p2.jsDev + 'hello_world.js'); (Works not in FF and Opera)
hello_world();

SHO.Style

sho.style.enableAlternateFile('blue');
sho.style.enableAlternateFile('green');
sho.style.disableAlternates();
sho.style.addFile(p2.css + 'xtra.css');
sho.style.removeFile('xtra.css');
sho.style.addClassById("sheet", "style2");
sho.style.addClassById("sheet", "style1");
sho.style.getStyleById('sheet', 'background-image');