Page1 : test.php (open in popup)
<script type="text/javascript">
function addFiles(aFiles) {
if ($('#addfiles').length==0) $('#addfiles').html;
for (var i=0;i<aFiles.length;i++) $("#addfiles").append(""+aFiles[i].file+"");
}
</script>
<?php
$result = "<div id=\"addfiles\"></div>"; (everything works good here, i have only one result)
?>
Page2: results.php (main page , already open)
<input type="texta" name="texta" id="texta" value="<? echo $result; ?>"/> ( i need value=”” to be auto updated with $result when $result have some result without refresh all page.)
Thanks
Edit:
function addFiles(aFiles) {
if ($('#addfiles').length==0) $('#addfiles').html;
for (var i=0;i<aFiles.length;i++) $("#addfiles").append(""+aFiles[0].file+"");
(window.opener.location = 'http://www.example.com/value='+aFiles[0].file+'');
self.close();
}
Working great now. Thanks
Then make the parent window get the value stored in ‘value’ via
$_GET['value']and echo this into the ‘value’ attribute of the input field.