Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Including a javascript that should be rendered to elements

    Hi,

    I have the following javascript for example:
    "
    <script type="text/javascript" src="http://js.bettingpartners.com/javascript.php?prefix=qSPobalAN7BuHZy5wfHdY2Nd7ZgqdRLk&amp;media=5267&amp;campaign=1"></script>
    "
    If I would put it a regular HTML file, as follows:
    "
    <html>
    <script type="text/javascript" src="http://js.bettingpartners.com/javascript.php?prefix=qSPobalAN7BuHZy5wfHdY2Nd7ZgqdRLk&amp;media=5267&amp;campaign=1"></script>
    </html>
    "

    Displaying the page in a browser will result in:
    "
    <html>
    <head>
    <script type="text/javascript" src="http://js.bettingpartners.com/javascript.php?prefix=qSPobalAN7BuHZy5wfHdY2Nd7ZgqdRLk&amp;media=5267&amp;campaign=1">
    </script>
    </head>

    <body>
    <a href="http://record.bettingpartners.com/_qSPobalAN7AYyCYL8bBxpmG4YftaDE0u/1/" target="_new"><img src="http://media.bettingpartners.com/GIF/Bovada/Poker_Welcome_Bonus/728x90.gif"></a>
    </body></html>
    "

    How can I get the same effect in SmartGWT?
    I have an HLayout and I want this javascript to be rendered in it, resulting with the IMG and the link.

    I already found an ugly workaround by using HTMLPane, setting ContentsURL to another HTML, and putting in that HTML the code I showed in the beginning of this thread.
    But:
    1) Some browsers block this call.
    2) There must be a better solution.

    Thank You !

    #2
    This question is also related to embedding AdSense to your web-app.

    Comment

    Working...
    X