Embedding documents in web pages 225
Using dynamically-generated iframes
To use relative address, you must use a dynamically-generated iframe.
This code generates an HTML iframe when the page is loaded. The
"nspirefile" parameter holds the location and file name of the
TI-Nspire™ or PublishView™ document that is to be shown on the page.
If the "nspirefile" parameter contains only the file name instead of the
full URL, you must upload the TI-Nspire™ or PublishView™ document to
your web server and ensure that it resides in the same folder as your blog
or web page.
Line breaks are not recognized in HTML source code. You may see the
iframe code strung together on a single line when you view the source
code in a text editor or HTML editor. To make the code easier to view,
you can manually add line breaks or enable Word Wrap. The following
example shows the code without line breaks.
<script type="text/javascript"
src="http://education.ti.com/html/nspireplayer/js/ticreateiframe.js"></
script>
<script type="text/javascript">
tiDeployPlayer.tiCreateIframePlayer(
// IFRAME attributes.
{
src : 'http://education.ti.com/go/nspireplayer',
width : '640',
height : '480',
scrolling : 'no',
frameborder : '0'
},
// TI-Nspire(TM) Document Player parameters.
{
nspirefile : 'myfile.tns'
}
);
</script>
<script type="text/javascript"
src="http://education.ti.com/html/nspireplayer/js/ticreateiframe.js"></
script>
<script type="text/javascript">
tiDeployPlayer.tiCreateIframePlayer({src :
'http://education.ti.com/go/nspireplayer', width : '640', height :
'480', scrolling : 'no', frameborder : '0' },{ nspirefile :
'myfile.tns'});</script>