开发者

GWT execution / rendering of OpenX ad invocation tags

A bit confounded here, coming up dry on Google, and yet afraid some simple answer is right under my nose: What is/are the best way/ways to get a GWT control to render an OpenX invocation tag? I've tried placing either OpenX's "JavaScript" or "iFrame" invocation types (for a zone) within GWT InnerHTML or HTML tags using UiBinder, and it's a no go. Do I need to get some eval()-ish execution of this OpenX invocation code happening? Just stuck, and any suggestions/brief example would be appreciated. (Note: Use of UiBinder 开发者_Go百科layout not a requirement... Happy to switch back to programmatic syntax.). Thank you so much.


What worked for me was to use an InlineHTML control in UiBinder, and declare it as a named ui:field. In code, referencing that ui:field, I first set a string to the "IFrame"-style invocation tag for the ad, as provided by OpenX, and after adding some random numbers to it (to head off browser-cacheing), I then apply the .setHTML(openx_iframe_invocation_tag_string) method to the reference, and the ad shows up in the space designated for the InnerHTML control.

As regards executing a JavaScript-style tag, some may want to try (I myself didn't go to far with it), execution of it within GWT via something like this script eval technique shown on http://snippets.dzone.com/posts/show/7052.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜