Parent doc values in Main window values to response doc in new window on Web

Hi All,

I am creating a discussion forum on web. I have following forms 1. Main 2. Response 3. Response to Response

Each form has REPLY button.

I have created few few documents using MAIN form. When open the MAIN doc and hit REPLY button, a new window opens with RESPONSE form and the values from MAIN doc like user name, date etc… should populate onto RESPONSE form(which is opened in new window).

New window is opening with REPSONSE form, how to get MAIN doc values to new window(response form) ?

Can anyone share your ideas and thoughts on this?

Thanks,

Arti

Subject: Parent doc values in Main window values to response doc in new window on Web

Just a few rough ideas:

  1. If username, date fields etc…are available to javascript then you can do the following on the popup window (response):

a.document.forms[0].FieldName.value = window.opener.document.forms[0].FieldName.value;

b.do the same for the rest of the fields.

  1. If username, date fields are not available to javascript then:

a.give the cell an id for eg:the td which contains the username value like and then access the value on the popup window (response):

b.document.forms[0].FieldName.value = window.opener.document.getElementById(“username”).innerText;

do the same for rest of the fields.

  1. You can pass the values via querystring and then access and parse the querystring values on the popup via javascript or a queryopen agent.

  2. You can also pass the universalid of the parent document or the document where the username and date values are stored via querystring and get that document by universalid in the queryopen agent and write the values out to the response.

HTH

Sai

Subject: Parent doc values in Main window values to response doc in new window on Web

Try selecting “Formulas inherit values from selected document” in the defaults tab of the form properties.

Subject: RE: Parent doc values in Main window values to response doc in new window on Web

I forgot about the new window. Mohits approach should work.

Subject: RE: Parent doc values in Main window values to response doc in new window on Web

Hi Joost,

Thanks for your help and followup.

I have the following code for reply button:

<input type = button value=“Reply” onclick=passinfo();

Function passinfo()

Print |var msub = window.opener.document.Subject.value; var mdt = window.opener.document.dt.value|

Print |window.open(document.forms[0].Webbase.value+"/"+"response"+"?OpenForm")|

End Function

and I am not getting how to pass the values to new widnow.

Correct me.

-Arti

Subject: Parent doc values in Main window values to response doc in new window on Web

Hi Arti,

you can get the values from parent document to the child document using javascript

using “window.opener.document.fieldname.value”

hope this will meet your req.

mohit

Subject: Parent doc values in Main window to response doc in new window on Web

Hi All,

Thanks for your help…

I have enabled the Inherit property on the response forms. But the values are not populating.

Mohit,

Can you be more clear or If you have sample code of that, can you ples send it…I am new bie.

Thanks for all your help,

-Arti

Subject: RE: Parent doc values in Main window to response doc in new window on Web

Arti,

While opening a new window from the parent window,

say onLoad event,just take a handle of the parent document

to get the values and set in the current document.

if (window.opener && !window.opener.closed)

window.forms[0].field.value=window.opener.document.field.value;

}

Try Like this and let me know.

mohit

Subject: RE: Parent doc values in Main window to response doc in new window on Web

Mohit,

Thanks for you code and help. I tried your code with no luck.

I would like to mention you one thig here. The Main window values are getting populated from view and displaying in tables using HTML. The new window is RESPONSE form.

Is that the reason the vaules are not populating?

-Arti

Subject: RE: Parent doc values in Main window to response doc in new window on Web

Hello,

Make your child forms default properites “Inherit formula values from selected windows”

and check this properties…

make the field computed with same what is there on parent on form which you want to inherit the value from parent form"

If any more query then please mail to dev_hdm@yahoo.co.in

Regards,

Dev"

CLP 6/6.5

PCLP 7.0