[thelist] javascript parent window form update

Ken Moore psm2713 at hotmail.com
Fri Jun 9 14:40:22 CDT 2006


Hi all,

Andrew Kamm was right twice. When you are doing online input, multiple table 
relations (FP, referential integrity, cascading whatevers) are often a 
problem. The best way is often to temporarily or permanently disable some of 
the automatic triggers.

Ken


>Dan McCullough

>
>I have an javascript parent update script, it updates a the form field
>with the returned value.  However I have a form where the fields are
>in an array, so I pass back 5 forms at once.
>
>image name:<br><input type="text" name="imageName[]" 
>value="">&nbsp;&nbsp;&nbsp;
>		<?php
>			print "<a href=\"".$_SERVER['PHP_SELF']."?page=".$page."\"
>onClick=\"openChild('upload.php?siteId=".$x."&field=imageName[".$x."]','win2')\">File
>Upload</a>.<br>";
>		?>
>		image by-line:<br><input type="text" name="imageByLine[]" value=""><br>
>		image story:<br><textarea name="imageBlurb[]" cols="75"
>rows="10"></textarea><br>
>		approved:&nbsp;&nbsp;<input type="checkbox" name="approved[]" 
>value="1"><br>
>
>so on and so forth down the line.  the openChild opens a small window.
>
>in there its a simple form
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
><html>
><head>
>	<title>Elauwit Newspaper Administration</title>
>	</head>
>
><body>
>
><form name="uploadForm" method="post" action="upload.php"
>enctype="multipart/form-data">
><p><input type="file" name="imageName"><br>
><input type="hidden" name="siteId" value="1">
><input type="hidden" name="field" value="imageName[]">
><input type="submit" name="submit" value="submit">
>
>
></body>
></html>
>
>after you upload its supposed to put the value back in the
>parent/opener window.  it works on other forms but because of the
>array I am having an issue putting the value back on the page.
>
><SCRIPT LANGUAGE="JavaScript"><!--
>opener.document.images.imageName[].value = '6215790.jpg';
>self.close();
>//--></SCRIPT>
>
>I know why, I just dont know how to fix or tweak to make it work on
>this form so that when I click it knows where to put the value.
>--
>
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester
>and archives of thelist go to: http://lists.evolt.org
>Workers of the Web, evolt !

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement




More information about the thelist mailing list