Jump to content

Recommended Posts

Okay this is nothing more than code I cut copied and pasted togther becuase I really don't know php . The form does pull up the child window but the child selection does not get into the parent form ..... what am I missing here ?
I do not have access to the actual choose-did.php file , only the output from it and I have to grab it remotely as it is on another server , is this what is messing with me ? There are two different sessions running ? I just lost with this ...

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<noscript>
<meta http-equiv="refresh" content="0; URL=enable_javascript.php">
</noscript>

<script language="JavaScript" type="text/javascript">
<!--
var mytarget;
var childWindowHandles = new Array();

function openNewWindow(url, name, params) {
return (childWindowHandles[childWindowHandles.length] = window.open(url, name, params));
}

function closeChildWindows() {
for (var loop=0; loop<childWindowHandles.length; loop++)
if (!childWindowHandles[loop].closed)
childWindowHandles[loop].close();
}
//-->
</script><script language="JavaScript" type="text/javascript" src="http://208.239.76.131/secure/includes/oejslib.js"></script>
<title>Untitled Document</title>
</head>
<body onFocus="closeChildWindows();">
<body>


<form name="did_select" method="post" action="testphp.php" style="margin:0">
<input name="index" type="hidden" value="0">
<div align="center">
<input name="did_prefix" type="text" value="Choose DID" readonly="1" size="12"
onclick="mytarget = this.form; openNewWindow('http://208.239.76.131/secure/choose-did.php?did_prefix=Choose DID&did_group=1',
'choose_did', 'width=450, height=200, dependent=yes, alwaysRaised=yes, titlebar=no, hotkey=no, resizable=yes');"
></div>
<input name="operation" type="hidden" value="EDIT_DID">
</form>


</body>
</html>
Link to comment
https://forums.phpfreaks.com/topic/8981-why-doesnt-this-child-parent-form-work/
Share on other sites

Hi all,,

Ober, Crayon Violent,, long time ago,... ;)

& yep, it seems it's about javascript,,
I get the firefox error report:
//
Erreur : uncaught exception: Permission refusée d'obtenir la propriété Window.mytarget
which could be translated into something like 'Permission refused to get the Window.mytarget property'
//
anyway, ghost0001, the code you posted has nothing to see with the error reported,... we need maybe some part of the file 'choose-did.php' to help,, or maybe some other scripts/files called by the 'choose-did.php' script,... don't know,,

btw, you make an html error while using 2 <body> tags (must use only 1 body tag),... it should be:
[code]
<body onFocus="closeChildWindows();">
...your code
</body>
[/code]
But this structure error is not about the 'Window.mytarget property' error report,,

Hoping it helps,,

l8tr,,
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.