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!

JavaScript with IE and Firefox problem...

843844Jul 31 2007 — edited Jul 31 2007
Hi all,
Iam having some problem in running the javascript with internet explorer and firefox which opens a popup, in the popup after selecting the data and

cliking ok, the parent window must refresh and the selected rows must b added automatically in the dataTable. the jsf code containing javascript is:
In parent page:
<h:dataTable align="center" border="1" id="data"
	value="#{parentBean.nameList}" var="beanvar"
binding="#{parentBean.myDataTable}">
	<h:column>
	<f:facet name="header">
	<h:outputText value="First Name"/>
	</f:facet>
	<h:outputText value="#{beanvar.firstName}" />
	</h:column>
	<h:column >
	<f:facet name="header">
	<h:outputText value="Last Name"  />
	</f:facet>
	<h:outputText value="#{beanvar.lastName}"/>
	</h:column>
	</h:dataTable>
<h:commandLink value="open popup" onclick="window.open('popWindow.faces','mywindow','height=300,width=250,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');" />             
The popup jsf code is:
<h:dataTable align="center" border="1" id="data"
	value="#{childBean.nameList1}" var="beanvar"
	binding="#{childBean.myDataTable}">
	<h:column>
		<f:facet name="header">
			<h:outputText value="Select" />
		</f:facet>
		<h:selectBooleanCheckbox valueChangeListener="#{childBean.cbClicked}" value="#{childBean.selected}" />
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="First Name" />
		</f:facet>
					<h:outputText value="#{beanvar.firstName}" />
			</h:column>
	<h:column >
		<f:facet name="header">
			<h:outputText value="Last Name"  />
		</f:facet>
		<h:outputText value="#{beanvar.lastName}"/>
	</h:column>
	</h:dataTable>
<h:commandButton  id="kk" value="ok" action="#{parentBean.refresh}" onclick="opener.location.reload();self.close();"/>
I hv given the h:form tags in the respective places.
The above code is working fine in internet explorer 7.0 ie the parent window is also refreshed automatically after clicking the "ok" button.
But in the firefox 2.0.0.5, its not working fine. The parent window is not refreshed but the popup closes automatically. Can any body hv some idea how to solve this problem?

Message was edited by:
JayKV
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2007
Added on Jul 31 2007
1 comment
81 views