

Ask YC:  How do you transfer input to and output from a widget in an iframe? - amichail


======
brooksbp
IFrame (Wikipedia): an HTML element which makes it possible to embed another
HTML document inside the main document.

Widget (Wikipedia): a portable chunk of code that can be installed and
executed within any separate HTML-based web page by an end user without
requiring additional compilation.

What exactly are you trying to ask? You can certainly exchange data via a
database and 'make it feel interactive' between the frames using
JavaScript/AJAX.

~~~
amichail
I have a Facebook page with an iframe containing a gwt widget. How do I
transfer data to the gwt widget? I know what this data is when I am generating
the Facebook page, so I was hoping there's an easy way to do this without
having the gwt widget contact the server to get its input.

I also need to get data back from the gwt widget. How should it send this data
back to the server?

------
tlrobinson
XMLHttpRequest?

~~~
amichail
Is there a way to avoid the request for input since you can include it in the
web page so that the widget can pick it up?

~~~
tlrobinson
Sorry, I don't quite understand what you mean. What exactly is the "input"?

~~~
amichail
The widget takes some input that the server knows. Instead of having the
widget make a request to the server to get it, can the server somehow include
this input in the web page so that the widget can take it directly from the
web page?

~~~
tlrobinson
Sure, but I still don't really know what you're talking about. You're talking
about a GWT widget?

~~~
amichail
yes

