I don't think you can add script tags to an HTMLPanel. AFAIK, you'll need to import the JS libraries in your module (.gwt.xml) using the following method: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideAutomaticResourceInjection. You should then be able to make calls to the Twitter API using JSNI.
Another alternative is to place this code in your HTML file and access it from GWT. -- Arthur Kalmenson On Sun, Dec 21, 2008 at 9:03 AM, Ghostcoder <[email protected]> wrote: > > I have a problem ,I am trying to add twitter js to my GWT site > using HTMLPanel widget ,I am trying to add the divs and javascript to > the HTMLPanel. > It works on Firefox but not on IE or chrome.I think IE and chrome does > not take the script tag or it does not call the javascript (may be for > security reasons I don't know why ).Please suggest a better way to do > this .I have pasted below the html content i am trying to add to > HTMLPanel > > <div id="twitter_div"> > <h2 class="sidebar-title">Twitter Updates</h2> > <ul id="twitter_update_list"></ul> > </div> > <script type="text/javascript" src="http://twitter.com/javascripts/ > blogger.js"></script> > <script type="text/javascript" src="http://twitter.com/statuses/ > user_timeline/xyz.json?callback=twitterCallback2&count=5"></ > script> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
