PDA

View Full Version : [JavaScript] IMHO pure avanzato: ho dei problemi...


Matrixbob
25-06-2008, 15:32
Mi trovo ad aver che fare con pulsanti che mi fanno comparire in basso a SX cose del tipo:

http://img106.imageshack.us/img106/3114/j1it5.png

http://img413.imageshack.us/img413/1202/j2ok5.png

, ma se guardo il sorgente della pagina l'unica cosa che riesco a vedere è roba del genere:


else if (pgData[i].changed == "D")
{
s += '<a href="javascript:parent.runOption(\'UNDELETE\',\'\',';
s += i;
s += ',\'\');" tabindex=-1>';
s += '<img src="/images/ScrUndelete.gif" border=0 title="Undelete">';
s += '</a>';
}


case 2:
if (mode == 'A')
{
s += '<input type="hidden" name="AUb_no">';
break;
}
if (mode == 'U')
{
s += '<input type="hidden" name="AUb_no">';
break;
}
s += '<input type="text" name="AUb_no" size=' + fieldMaxSize[i] + ' maxlength=6';
s += ' style="border: solid black 1px"';
s += ' onchange="parent.rowChanged=true;return(parent.validField(this,\'\',' + i +',';
s += 'true ,';
s += 'false,';
s += 'false))"';
s += ' tabindex=' + i+1 + '>';
break;


, e sparsi varie definizioni e richiami:

function runOption(program, argList, recno, toolTip)
{ ... }


<html><body onload="parent.loadData()"></body></html>


<html><body onload="parent.loadOptions()"></body></html>

Matrixbob
25-06-2008, 15:47
... non è che non ho domande, ho postato per vedere se qualcuno mi da una mano a comprendere questo mix di cose. :)

Ad esempio la storia "Frames: Parents and Children" non mi è ben chiara come funziona. :boh:

http://img119.imageshack.us/img119/9236/parenthu4.png

http://img507.imageshack.us/img507/348/parent2ed9.png

http://img410.imageshack.us/img410/1091/parent3yp3.png

http://en.wikipedia.org/wiki/Frameset
http://it.wikipedia.org/wiki/Frameset
il tag nella traduzione italiana delle specifiche ufficiali del W3C (http://www.diodati.org/w3c/html401/present/frames.html#h-16.2.11)

Matrixbob
26-06-2008, 12:57
UP!
Quindi partent fa VERAMENTE riferimento alla pagina che contiene il frameset, ad esempio una index.htm?


<html>
<head>
<title>Gestione dei frame con Javascript (index.html)</title>
</head>

<frameset rows="80,*" border="3">
<frame src="intestazione.html" name="intestazione" noresize scrolling="no">
<frameset cols="150,*" border="no">
<frame src="menu.html" name="menu" noresize scrolling="no">
<frame src="principale.html" name="principale" noresize scrolling="auto">
</frameset>
<noframes>FRAME NON SUPPORTATI</noframes>
</frameset>
</html>


Rifacendomi al post precedente, se in "principale.html" uso parent.loadData() allora sto dicendo di caricare i dati dalla pagina "index.html" padre di "principale.html" ?!