Difference between revisions of "Pandora Templates"

From SmartWiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 24: Line 24:
 
</script>
 
</script>
 
<body>
 
<body>
 +
 +
 
</body>
 
</body>
 
</HTML>
 
</HTML>
Line 63: Line 65:
 
</HTML>
 
</HTML>
 
</pre>
 
</pre>
 +
 +
'''NOTE:''' The ''includejsfiles'' method must be called onload. If you try to call it before the full page has loaded some Browsers will freeze.
  
 
==Browser Script==
 
==Browser Script==
 
To use [[Pandora]] as part of a [[Browser Script]] Custom Field use the following template:
 
To use [[Pandora]] as part of a [[Browser Script]] Custom Field use the following template:
  
</pre>
+
<pre>
 
</script>
 
</script>
 
<script type="text/javascript" language=JavaScript src="/Ajax/uta/uta.js">
 
<script type="text/javascript" language=JavaScript src="/Ajax/uta/uta.js">

Latest revision as of 16:26, 10 September 2012

In order to use and enable Pandora within SmartSimple you should start with the following templates.


Static HTML Page

To use Pandora as part of a static html file stored in a SmartFolder use the following template.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
  <HEAD>
    <TITLE></TITLE>

<SCRIPT type="text/javascript" language=JavaScript src="/Ajax/uta/uta.js"></SCRIPT>
<script language="javaScript">


function myfunction(){
  ss_developer_key="abcdefghijklmnopqrstuvwxyz123456790=";
  //your code goes here...

}

</script>
<body>


</body>
</HTML>


Web Page View

To use Pandora as part of a Web Page View Custom Field use the following template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
  <HEAD>
    <TITLE></TITLE>
<script language="javaScript">
function include_dom(script_filename) {
    var html_doc = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', script_filename);
    html_doc.appendChild(js);
    return false;
}
function includejsfiles() {
  include_dom("/Ajax/uta/uta.js");
 }

function myfunction(){
  ss_developer_key="abcdefghijklmnopqrstuvwxyz123456790=";
  //your code goes here...

}

</script>
  </HEAD>
 <BODY onload="includejsfiles()">
</BODY>
</HTML>

NOTE: The includejsfiles method must be called onload. If you try to call it before the full page has loaded some Browsers will freeze.

Browser Script

To use Pandora as part of a Browser Script Custom Field use the following template:

</script>
<script type="text/javascript" language=JavaScript src="/Ajax/uta/uta.js">
</script>
<script language="javaScript">

function myfunction(){
  ss_developer_key="abcdefghijklmnopqrstuvwxyz123456790=";
  //your code goes here...

}