<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style " align="center"
style="float: right; padding: 25px 0px 0px 0px; "><a class="addthis_button_facebook_like"
fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a></div>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript"
src="http://s7.addthis.com/js/250/addthis_widget.js#username=XXXX"></script>
<!-- AddThis Button END -->
When you hover mouse, it will pop up a window with more options. And if it is a Frame widget, the pop up is clipped inside the frame.
Otherwise, I tried Paul's code to get rid of the frame border, it works like a charm, Thanks, Paul!
That serves the purpose well for all external widget that doesn't have a popup.
Now I am still secretly wishing there is a solution for loading any external widget using HTML so I have one solution for addthis and expedia.
:)
On Sat, May 28, 2011 at 7:26 AM, Qiang Ma <mumayuan@gmail.com> wrote:
Thanks Paul. Go to the Frame is not the best option. For example, if the 3rd party javascript has popup window, it will be clipped within the Frame size. So I am still struggling with just using HTML widget.
I found that it could all be the java script not loading when the HTML widget is rendered. I am guessing that because I experimented add the java script reference to the GWT base HTML and have the HTML widget only with the "div id". On Firefox, the first load of the APP failed to display the widget, but after a refresh(perhaps the javascript is cached), it will display it correctly. on IE, it doesn't work.
So my current hope is : if I can find a way to dynamically load the javascript in the code:HTML html = new HTML("<div id='searchform_634420069924922689'></div>");
<script type='text/javascript' src='http://widgets.partners.expedia.com/daily/shared/ affiliates/WidgetService.aspx?partner=cj&pid=999999&size=120x600&window=new&branded=true&widgetname=searchform&divid=searchform_634420069924922689'></script>
somepanel.add(html);
"magic load the above javascript"
Can someone tell me whether I am heading the right direction or even know the little magic?
Thanks a lot!
On Sat, May 28, 2011 at 6:53 AM, Paul Stockley <pstockley1@gmail.com> wrote:
You can hide the border on IE with a JSNI call.
private native void hideIFrameBorder(Element iframeEl) /*-{
iframeEl['frameBorder'] = '0';
}-*/;
private native void reloadIFrame(Element iframeEl) /*-{
iframeEl.contentWindow.location.reload(true);
}-*/;
I also added a reload frame option as I couldn't find a way to reliably refresh a frame.
--You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment