Hi Jaichander. I don't completely know if I understand exactly what
you're doing, but I'll try to answer your question. It sounds like you
want to display an HTML form in the canvas view that the user can use
to select one or more pieces of data for display in the profile view.
I understand this part. It sounds like you're using the persistence
API (e.g. newUpdatePersonAppDataRequest) to save the user's form
selection, which is great.

This is where I lose you. In the profile view, you can fetch the
user's saved data using newFetchPersonAppDataRequest, and then display
the appropriate data based on the user's previous selection. So you're
talking about two JavaScript functions here, one that updates the app
data (in the canvas view) and one that retrieves it (in the profile
view). So you can place these functions in their respective views.

Alternatively, you can use a "hybrid view" in addition to the two
content sections you've already specified to put markup and JavaScript
that's common to both views. Something like:

<Content type="html" view="profile">
  <![CDATA[
    <h1>Profile</h1>
  ]]>
</Content>

<Content type="html" view="canvas">
  <![CDATA[
    <h1>Canvas</h1>
  ]]>
</Content>

<Content type="html" view="canvas,profile">
  <![CDATA[
    <h2>This shows up in canvas and profile views</h2>
  ]]>
</Content>

This wiki page has more info.:

http://code.google.com/p/opensocial-resources/wiki/MultipleContentSections

Please let me know if this doesn't completely answer your question. If
you can provide more details about what will actually be displayed in
the profile view and how this relates to the choices in the HTML form,
that might help a lot.

- Jason

On Jun 16, 4:03 am, "Jaichander  Ramesh"
<[EMAIL PROTECTED]> wrote:
> Ok-
> I have written this piece of code that starts  like an HTML form ,then comes 
> the java script code to display the data selected by the user.
> I want to display the form in canvas view and the selected data which is the 
> output of the javascript code on the profile view.(the javascript code is a 
> modification of the persistent data example code)
>
> Now if we have 2 content sections then we could specify what we want in each 
> view. But then I need to call the java-script function from the html code and 
> having 2 content sections does not let me do that.
>
> Any bright ideas!
> Cheers!
> Jaichander
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to