Jump to content


Photo

Why doesn't this child parent form work ?


  • Please log in to reply
3 replies to this topic

#1 ghost0001

ghost0001
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 03 May 2006 - 05:13 PM

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.13...b.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.13...d_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>

#2 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 03 May 2006 - 05:29 PM

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.
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#3 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 03 May 2006 - 05:30 PM

Agreed.

Info: PHP Manual


#4 GBS

GBS
  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 03 May 2006 - 08:27 PM

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:
<body onFocus="closeChildWindows();">
...your code
</body>
But this structure error is not about the 'Window.mytarget property' error report,,

Hoping it helps,,

l8tr,,
Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users