No replies
181 Posts

Pinned topic Widget that calls exernal Javascript

‏2009-10-07T21:14:14Z |
Using the simplified widget model (via .zip) for Mashup Hubs because I can't get a .war version to work. We have a flash file we want to display in a widget, but we want to call an external Javascript file first to confirm that the user has all the prerequisites. This is in my iwidget.xml file:

<iw:iwidget name="helloworld" xmlns:iw="" supportedModes="view" mode="view" lang="en">
<iw:resource uri="AC_RunActiveContent.js" />
<iw:content mode="view">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
'codebase', ',0,0,0',
'width', '1024',
'height', '768',
'src', '',
'quality', 'high',
'pluginspage', '',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'matrix',
'bgcolor', '#ffffff',
'name', 'matrix',
'menu', 'true',
'allowFullScreen', 'false',
'movie', 'matrix',

'salign', ''
); //end AC code
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="1024" height="768" id="story1FS" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="" quality="high" bgcolor="#ffffff" width="1024" height="768" name="story1FS" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="" />

This is causing a DOM onload error to occur when I load the widget in Mashups (2.0 beta). Any idea what's causing this?