Pandora Templates

From SmartWiki
Jump to: navigation, search

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...

}