File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes javascript error... plz help 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 "javascript error... plz help " Watch "javascript error... plz help " New topic

javascript error... plz help

Jack Daniel
Ranch Hand

Joined: Jun 15, 2002
Posts: 163
Well, In a JSP page,.. when you click on a link i am opening a pop-up window for the user to select... using :
<SCRIPT language=JavaScript>
var aWindow = null;'mainwin';
function openWin(URL, w, h){
aWindow = open(URL,'aWindow','width='+w+',height='+h+',scrollbars=yes, status=yes');
aWindow.opener = self;
<a href="javascript: openWin(/worklocations.html',650,545);">Change</a>
This is working fine..
but from the child window, i want to copy the selected value to the parent window..
i used :
function sendValue(s){
var selvalue = s.options[s.selectedIndex].value;
alert(selvalue); // for testing, working fine

window.opener.document.f1.wlocation.value=selvalue; // problem here
But when i do this, it throws a JS Error saying Access is denied .. at
the following line : in the pop-up window
Any idea why this is happening..??
your help would be greatly appreciated...
Thanks a lot.. ;-) I appreciate your help...
Jack Daniel
Ranch Hand

Joined: Jun 15, 2002
Posts: 163
Hey guys,
I solved the problem,..
Thanks anyway ;-)
I agree. Here's the link:
subject: javascript error... plz help
It's not a secret anymore!