ti ringrazio tantissimo di dedicarmi tempo.
Quello che dici te e' giustissimo...ora ti dico come e' andata....pero' quello che volevo ottenere non va ancora per qualche arcano motivo.
Le prove le ho sempre fatte sia con IE che con Mozilla.
Ora..quello che mi hai chiesto di provare era :
1) alert(document.frames.if_prova.document.getElement ById("im_prova").src);
questo non va in entrambi i browser
2) alert(top.if_prova.document.getElementById("im_pro va").src);
questo va con entrambi i browser
3) alert(parent.if_prova.document.getElementById("im_ prova").src);
anche questo va con entrambi
A questo punto ho provato a cambiare l'immagine ma ho un comportamento strano....
Provando dunque a cambiare l'alert o del punto 2 o del punto tre rispettivamente con
top.if_prova.document.getElementById("im_prova").s rc = "immagine.jpg" e
parent.if_prova.document.getElementById("im_prova" ).src = "immagine.jpg"
Con IE nessun segno di vita....con Mozilla mi viene nella barra di stato in basso la scritta Trasferimento dati da localhost
allora ..... a questo punto ti posto tutto il codice...con un copia incolla puoi tentare anche te di risolvere questo enigma.
Codice PHP:
<html>
<head>
<title>kkkk</title>
<link rel = "stylesheet" type = "text/css" href = "../css/hyperlife.css">
<style type="text/css">
/*contenuti*/
.conts {
visibility: hidden;
left: 0px;
top: 0px;
position:absolute;
}
/* menu linguette non selezionato */
.tab { font-family: Verdana; font-size: 8pt; font-weight: normal; text-align: center;
border-left: thin solid #e0e0e0;
border-right: none;
border-top: thin solid #e0e0e0;
width:115px;
cursorointer;
}
/* menu linguette selezionato */
.selTab { font-family: Verdana; font-size: 8pt; font-weight: bold; text-align: center;
border-left: thin solid #919B9C;
border-right: thin solid #919B9C;
border-top: thin solid #919B9C;
background:#F4F3EE;
width:115px;
cursorointer;
}
/* tabella generale menu linguette*/
.tabbedDialog
{
font-family: Verdana; font-size: 8pt; font-weight: normal;
background-color: #F0F0E6;
WIDTH: 100%; HEIGHT:100%;
}
</style>
<script language="javascript" src="../functions/common.js"></script>
<script language="javascript">
var currentTab;
var tabBase;
var firstFlag = true;
var s_sessName;
window.onload=function(){
init();
}
function changeIcon(){
//alert(if_prova.document.getElementById("im_prova").src);
//if_prova.document.getElementById("im_prova").src = "prova.png";
// alert(document.frames.if_prova.document.getElementById("im_prova").src);
//alert(top.if_prova.document.getElementById("im_prova").src);
//alert(parent.if_prova.document.getElementById("im_prova").src);
parent.if_prova.document.getElementById("im_prova").src="aiuto.jpg"
}
//sets the default display to tab tab
function init(){
document.getElementById("tabContents").innerHTML = document.getElementById("t1Contents").innerHTML;
}
//a public function that the container uses to pass in values for the card containers
function public_Contents(contents1, contents2){
document.getElementById("t1Contents").innerHTML = contents1;
document.getElementById("t3Contents").innerHTML = contents3;
init();
}
function changeTabs(tabID){
if(firstFlag == true){
currentTab = document.getElementById("t1");
tabBase = document.getElementById("t1base");
firstFlag = false;
}
if(document.getElementById(tabID).className == "tab"){
currentTab.className = "tab";
tabBase.style.backgroundColor = "#919B9C";
currentTab = document.getElementById(tabID);
tabBaseID = currentTab.id + "base";
tabContentID = currentTab.id + "Contents";
tabBase = document.getElementById(tabBaseID);
tabContent = document.getElementById(tabContentID);
currentTab.className = "selTab";
tabBase.style.backgroundColor = "";
document.getElementById("tabContents").innerHTML = tabContent.innerHTML;
}
}
</script>
</head>
<body>
<table bgcolor ="#ECE9D8" width = "100%" height = "100%" border ="0" bordercolor ="black"cellspacing="0" >
<tr valign = "top" align="left">
<td height="3">[img]images/spacer.gif[/img]</td>
</tr>
<tr valign = "top" align ="left" >
<td align = "center" valign = "top" height="10">
<table width="530" align="center" cellspacing="0" border ="0" bordercolor ="green">
<tr>
<td class="selTab" onclick="changeTabs('t1')" id="t1">Session Info</td>
<td class="tab" onclick="changeTabs('t3')" height="25" id="t3" >General Settings</td>
</tr>
<tr>
<td id="t1base" style=" BORDER-LEFT: gray thin solid; HEIGHT:2px; " ></td>
<td id="t3base" style="BACKGROUND-COLOR: #919B9C; HEIGHT: 2px; "></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align ="center" valign="top" height="100">
<table border = "1" bordercolor ="#919B9C" cellspacing = "0" cellpadding ="0" width ="530" height="370">
<tr>
<td valign ="top" bgcolor="#F4F3EE">
<table width="100%" align = "center" cellspacing="0" border ="0" bordercolor ="blue">
<tr>
<td id="tabContents" ></td>
</tr>
<tr >
<td valign ="top">
<div class="conts" id="t1Contents" >
<fieldset style="width:500px;height:180px;" align = "center">
<legend > dati</legend>
<table bgcolor="#F4F3EE" width="400" height ="200" align = "center" valign ="top" cellspacing="10">
<tr>
<td align="left">Name:</td>
<td></td>
<td> <iframe name = "if_prova" src = "prova.php" width="400" height="400" id="framepippo"></iframe></td>
<td><input type = "button" value="cambia" onClick="changeIcon();"></td>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="conts" id="t3Contents" >
seconda tabbed
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
sostanzialmente il codice aggiuntivo js che vedi serve a pilotare un menu a linguette ....che funziona con i div....mi vien da dire che senza quelli funzioni.....vorrei sapere come oltrepassare questa menata...