This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes window.opener.document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.opener.document" Watch "window.opener.document" New topic


Rekha Pande
Ranch Hand

Joined: Jan 29, 2004
Posts: 145
Hi all,

I have two forms
1. Parent Form
2. Child Form
I have used window.opener.document.Parent_forname.fieldname.value = childform_value

function sendInfo(TxtVal)
window.opener.document.Parent_forname.fieldname.value = TxtVal
window.close(); //Closes the child window

Button in the child form - onclicking = "sendInfo('Passing a Value')"

Now the passing of value from the child form to the parent WORKS FINE on my PC when running through tomcat 8080, but when i upload the application to the tomcat server which is running on my companies intranet, it says that
Parent_forname.fieldname is null or not an Object.

Can any body plz suggest any reason why when the application runs from my PC it works fine, but when the same in run from tomact server which is live it gives a null object error..!!!???

Thanxs in advance.
Rekha Pande
Ranch Hand

Joined: Jan 29, 2004
Posts: 145
Hi all,

I didn't change my code, but the error that it is giving me right now is Access denied/..???

Can any one suggest as to why this error is coming..and not allowing my child form to interact with the parent form..!!!

Rekha Pande
Ranch Hand

Joined: Jan 29, 2004
Posts: 145
Hi all,

Yeh my problem is solved. I had searched this forum for access denied error and i cam across this post Java ranch forum - Access denied.

And the url was http://textport:8080/texturl.jsp and the child form url was 1111.22:8080/upload.jsp

When i changed the 1111.22:8080 to textport:8080, its working fine now..!

Any ways thanxs to all.
I agree. Here's the link:
subject: window.opener.document
It's not a secret anymore!