Form Data Posting

Skip to first unread message


Jul 22, 2011, 2:00:13 AM7/22/11
to Raplet developer discussion list

I am a newbie as raplet development is concerned. I have followed all
the tutorials and tested the code regarding the implementation of
raplets. What i am curious to know is how can i post data to the

For e.g. I have one text box and submit button. User fills some data
in the text box and clicks on submit button. This data should be
posted to the server.
I have created text box and submit button inside the form tag under
html parameter. The raplet is properly loaded with text box and submit
button. When i click on the submit button whole page is refreshed i.e.
gmail url.
What i want is that only raplet container should reload?

I am confused how to make it happen. Should i use ajax?

Please help me on this. If there is any reference related to this
please suggest.


Martin Kleppmann

Jul 22, 2011, 7:41:40 PM7/22/11
Hi Pankaj,

The easiest way of achieving this is with an iframe. Rather than
including your form HTML in the Raplet response, just make the Raplet
HTML something like <iframe src="" width="200"
height="200"> and load the form HTML from
When you post that form, only the iframe will be refreshed. This has
the downside that you have to set a fixed size for the iframe, but if
that's not a problem for you, this is the simplest solution.

Alternatives would be to use JSONP with an OAuth2 token, or Ajax with
cross-origin resource sharing (CORS), but they are a bit more
complicated to set up.


Martin Kleppmann
Co-founder, Rapportive

> --
> You received this message because you are subscribed to the Google
> Groups "Raplet developer discussion list" group.
> To post to this group, send email to
> To unsubscribe from this group, send email to
> For more options, visit this group at

Martin Kleppmann

Jul 22, 2011, 7:44:52 PM7/22/11
Oh, and to correct myself: it would of course be best to use a
https:// page for your form and your raplet, not http:// since Chrome
is moving towards blocking non-encrypted content inside secure pages.


Martin Kleppmann
Co-founder, Rapportive

Reply all
Reply to author
0 new messages