Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

access parent elements from child in jsf

843844Jul 14 2007 — edited Jul 15 2007
parent jap
<h:form id="form1">
      <h:inputText id="xxx" value="xxxxxxx"/>
      <h:commandLink onmousedown="window.open('/my_child.jsp')">
                    <h:outputText value="viewImage"/>
       </h:commandLink>
 
my chiled jsp
        <head>
            function updateParent()
       {
       var xname = window.parent ;
       alert (" Parent" + xname);

       var xname1= window.parent.document;
        alert (" Parent" + xname1);

       var formww = window.parent.document.getElementById('form1:xxx');
        alert( " Parent name"+ formww);
       }
        </head>
        <body>
        <input type="text" value=""/>
       <input type="submit" value="Submit" onclick="updateParent()"/>
</body>
and i am not able to get element by id 'xxx' from parent in child in jsf

but the above two gives the object.

i need to update the text in parent jsp with the value from child.

Thanx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2007
Added on Jul 14 2007
1 comment
323 views