help needed on how to attach a banner link into my app

Hello guys!

I have banner link that i want to put in my application

<script type="text/javascript" src=></script>

I tried putting it in layout.html, also as emmbeded
but both failed to work.

please any idears on how to do that.

Embedded can not be used for this, but customlayout should support script-tags correctly. Did the rest of the customlayout show correctly? The problem might be that the banner script uses document.write(…) to write the banner and this might not work work as the document might point to wrong page (gwt executes script in an iframe). If this is the case, it might be challenging to fix.

Other solutions that come into my mind:

If you are using custom index.html page (instead of the one generated by the servlet), you can add this script directly to the page.

If you know the size of the banner, you could add an iframe that points to a static page containing this source.


As Joonas mentioned, CustomLayout is the best shot here, but it is rather tricky too. If you can change the script so that you replace all document references to $doc it ought to work. In GWT scope (where custom layout scripts are evaluated), $doc references to host pages document object and $wnd to host window object.


Changing the original source might be impossible as it is loadded from ad-provider (?). I would go with iframe to go aroung GWT:s $doc != document limitation.