codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Submitting a parent form from a child window in IE 7  livehed at 16:16 on Thursday, February 15, 2007
 

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









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  perl cgi and html links
•  Re: bar graphs
•  Perl Developers Guide
•  Submitting a parent form from a child window in IE 7
•  combo box
•  Problem in comiling
•  New to C++ need help
•  Re: Auto Mail Notification
•  Re: array copy


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007