Do you have a page to serve? If so, use that here with its full path to its location on your server:
Code:
document.write('<iframe width="100%" height="312" allowtransparency="true" ' +
'scrolling="no" frameborder="0" hspace="0" vspace="0" ' +
'src="your page goes here"></iframe>');
Save that file as whatever.js and give your users the address to it to put on their page, ex:
Code:
<script src="http://full_path_on_your_server_to/whatever.js" type="text/javascript"></script>
Now, if your page (your page goes here) is a PHP page and you want your users to pass a code to it, you can have them use two scripts (like what the widget site does):
Code:
<script type="text/javascript">var myObject = { fid: 201 };</script>
<script src="http://full_path_on_your_server_to/whatever.js" type="text/javascript"></script>
Then in your whatever.js (add red):
Code:
document.write('<iframe width="100%" height="312" allowtransparency="true" ' +
'scrolling="no" frameborder="0" hspace="0" vspace="0" ' +
'src="your page goes here?fid=' + myObject.fid + '"></iframe>');
Bookmarks