Jump to content

Inserting Script code in iFrame

Recommended Posts

II would like to insert the online advertisement script below inside an iframe my smartmobilestudio code. Tried but getting errors. 

Is there an easy way to do this?


<script type="text/javascript">
    atOptions = {
        'key' : '000000',
        'format' : 'iframe',
        'height' : 60,
        'width' : 468,
        'params' : {}
    document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://abc123/invoke.js"></scr' + 'ipt>');

Link to post
Share on other sites
  • Moderators

Something like this

  var Script : variant := browserapi.document.createElement('script');
  Script.src := '<your script statements>';
  Script.onload := procedure
    writeln('script loaded');

you can put <the script statements> as javascript in an asm block or alternatively pascalify them :

var atOptions : variant := new JObject;
atOptions.key := '000000';


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...