• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javascript error... plz help

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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;
self.name='mainwin';
function openWin(URL, w, h){
aWindow = open(URL,'aWindow','width='+w+',height='+h+',scrollbars=yes, status=yes');
aWindow.opener = self;
}
</SCRIPT>
and
<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 :
<SCRIPT LANGUAGE="JavaScript">
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
window.close();
}
</script>
But when i do this, it throws a JS Error saying Access is denied .. at
the following line : in the pop-up window
window.opener.document.f1.wlocation.value=selvalue;
Any idea why this is happening..??
your help would be greatly appreciated...
Thanks a lot.. ;-) I appreciate your help...
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,
I solved the problem,..
Thanks anyway ;-)
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic