Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > Other Programming Languages
|
Other Programming Languages If you have a coding issue to discuss about another language that really isn't provided for in any other forum here (not ASP.NET C#, C++, VB, PHP, JavaScript, Python, Java, Perl, Applescript, XML or any of the other forum topics we have), post it here. Enough discussion on a language we don't have covered could prompt a new forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Other Programming Languages section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 15th, 2007, 01:07 PM
Authorized User
 
Join Date: Jun 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Submitting a parent form from a child window in IE

Hi,
I'm trying to submit a parent form from a child window using javascript in Internet explorer version 7.
But I get "Access denied" error message when I'm trying to access "document" object of parent form in child window.
Is there any workaround for this???Please let me know.

FYI,both the parent and the child are in the same security domain.

And btw, the same code works fine in Internet explorer version 6.

The problem is only in IE 7.

This is the code in my child window...

function MyFunction()
{
  try
    {
  var win = window.opener;
  if ( win )
  {
   var Form = win.document.globalDataForm;
   Form.warningsList.value="";
   Form.skipSave.value = "Y"
   Form.targetWizard.value = "6";
   Form.targetStep.value = "1";
   Form.targetMode.value = "1";
   Form.func.value = "MoveTo";
   Form.bypassWorkflow.value = "N";
   Form.target = "";
   Form.submit();
  }
 }
 catch (e)
 {
 }
}

I'm getting "Accessed denied" at this line in the above code:
var Form = win.document.globalDataForm;
Here,"globalDataForm" is the form name in parent window.

Thanks in advance...!

Regards,
livehed
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Close Child window automatically on closing parent vikas67k C# 1 August 26th, 2008 02:00 AM
Closing parent window from child window arnabghosh Javascript How-To 1 December 26th, 2007 01:18 AM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
Propogating changes in child window to parent Scripts82 ASP.NET 1.0 and 1.1 Basics 4 September 22nd, 2006 07:07 AM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.