hello
come si fa a fare il refresh della pagina che contiene un frame, dall'interno del frame???
per spiegarmi meglio, io ho una pagina con all'interno un frame. Vorrei dall'interno del frame rinfrescare la pagina contenitore.
is possible?
hello
come si fa a fare il refresh della pagina che contiene un frame, dall'interno del frame???
per spiegarmi meglio, io ho una pagina con all'interno un frame. Vorrei dall'interno del frame rinfrescare la pagina contenitore.
is possible?
Ciao impennata,
codice:top.location.reload();![]()
..e ovviamente se devo spedire qualche variabile prima di pare il reload mi setto href giusto?
io avevo trovato:
parent.location.href = "ciao.php?id=1&pippo=1"
parent.location.reload()
.che ne dici e` corretto?
con top vai all'elemento più alto, se non ci sono altri frame nidificati equivale al parent.
se devi passare delle variabili devi usare solo l'href e non il reload.
![]()
bene, questo e` il mio script all'interno del frame:
<script language="javascript">
pageFormMode = parent.groupForm.pageFormMode.value
groupName = top.groupForm.groupName.value
idGroup = top.groupForm.idGroup.value
top.location.href="groups.php?iconFilename='
<?php print($uploadedIconName); ?>'&FormMode=' +
pageFormMode + '&groupName=' + groupName +
'&iframeRefresh=1&idGroup=' + idGroup
</script>
bene, ...non mi rinfresca!!!
![]()
impennata dovresti descrivere la tua pagiana... cioè... hai un frameset fatto come?
il mio frame e`
<Iframe src="groupIconBrowse.php" title="Group Icon Upload Utility" width="500" height="300" frameborder="0" marginwidth="0" marginheight="0"></iframe>
questo e` il codice che lo richiama nella pagina principale.
Poi il codice del frame e`:
<?php
include("calendar_header.php");
if($_POST["Attach"] != ""){
$filename = $HTTP_POST_FILES['userFile']['name'];
$type = $HTTP_POST_FILES['userFile']['type'];
$location = $_POST["toLocation"];
$continueUpload = true;
if($continueUpload == true){
if($filename == "")
print("Error : File not selected");
else{
if(!copy($HTTP_POST_FILES['userFile']['tmp_name'],($location . "/" . $filename))){
print("Error : failed to copy the icon file into the calendar");
}else
print($filename . " - TESTED
" );
$uploadedIconName = $filename;
}}}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="description" content="addDescription" />
<meta name="keywords" content="addKeyword" />
<meta name="author" content="www.kc3.net - Internet Solutions Provider. Please email sales@kc3.net for further information." />
<?php if($IsLoggedIn == 1){ ?>
<style type="text/css">
<!--
table.Standard{
width:auto;
}
-->
</style>
<?php } ?>
</head>
<body>
<?php if(allowAccess(2)){ ?>
<form action="groupIconBrowse.php?idEvent=<?php print($idEvent); ?>&idGroup=<?php print($idGroup); ?>iframeRefresh=1" method="POST" name="eventForm" id="eventForm" enctype="multipart/form-data">
<input name="toLocation" type="hidden" value="<?php print($_SERVER['DOCUMENT_ROOT'] . "/phptest/images/icons"); ?>" size="20" maxlength="255" />
<input name="userFile" type="file" value="<?php print($fileName); ?>" size="48" maxlength="255"/>
<input type="submit" value="Attach" name="Attach" />
</form>
<?php if( $uploadedIconName != ""){ ?>
<script language="javascript">
pageFormMode = top.groupForm.pageFormMode.value
groupName = top.groupForm.groupName.value
idGroup = top.groupForm.idGroup.value //top.location.href="groups.php?iconFilename='<?php print($uploadedIconName); ?>'&FormMode=' + pageFormMode + '&groupName=' + groupName + '&iframeRefresh=1&idGroup=' + idGroup" top.location.href="groups.php?iconFilename=<?php print($uploadedIconName); ?>&iframeRefresh=1"
//top.location.reload()
</script><?php } } ?>
</body>
</html>
c'e php in mezzo, ma comunque all'interno del frame c'e` una form per fare l'upload di un file, niente di piu`.
Allora...
nuovi sviluppi, in explorer e opera funziona, ma siccome io di solito uso netscape non mi funziona.
Allora 2 sono le cose, o non funziona molto bene il tag
<iframe> in netscape, oppure qualche problema con il javascript!
Suggerimenti