Jump to content

Archived

This topic is now archived and is closed to further replies.

ghost0001

Why doesn't this child parent form work ?

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>

Share this post


Link to post
Share on other sites
this totally needs to be moved to javascript forum

edit:
well, what i really meant was, you'll have better luck if you asked your question in the javascript forum.

Share this post


Link to post
Share on other sites
Agreed.

Share this post


Link to post
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,,

Share this post


Link to post
Share on other sites

×

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.