javascript API

Dear Vaadin experts,

   I am trying to understand how I can put javascripts widgets on page. I tried pasting the example below in the demo page with no response and my code doesn't appear to do anything either.   The widgets I've seen sound easy - "just cut and past on your web site"  - I know I'm missing something. I've looked through related posts and still am a bit lost.

I copied the one code below from

So I tried coding, my latest attempt:

String this1 = "<script type="text/javascript" src="\“></script>”;


I’d like to run this in a panel, and while I got a lot farther with the Label and XHTML options, I never got output.

l1 = new Label("iframe src=\"\"></script>"+

    Panel p1 = new Panel();		

Any hints would be appreciated.



Window.executeJavaScript expects a plain JavaScript string, not a URL. So you need to retrieve the contents of that URL in the server, store it into a string, and then pass that string to executeJavaScript.

Cool. I just didn’t get that until now. Thanks!