Ciao alfi,
sei sulla strada giusta :metallica
solo che non puoi mettere uno script all'interno dei tag per il frameset. Potresti scrivere tutto con lo script
codice:
<script>
function JSRequest(key){
var myQueryString = new String(window.location.search); // assume la querystring
var myQueryString = myQueryString.replace("?",""); // toglie il punto interrogativo
var splittedQS = myQueryString.split("&"); // separa le coppie chiave/valore
for (i=0; i<splittedQS.length; i++){
myKeyValueSplitted = splittedQS[i].split("=");//separa la chiave dal valore
if (myKeyValueSplitted[0] == key){
//alert(myKeyValueSplitted[1]);
return myKeyValueSplitted[1];
}
}
}
document.write ('<frameset cols="184,*" framespacing="0" border="0" frameborder="0">\n');
document.write ('<frame name="sinistra" scrolling="auto" noresize target="sinistra" src="menusx.htm" marginwidth="0" marginheight="0">\n');
document.write ('<frameset rows="82,*">\n');
document.write ('<frame name="superioredx" target="superioredx" src="intestazione.htm" scrolling="no" noresize>\n');
// per recuperare il valore della variabile ti basta scrivere
valore = JSRequest("pagina");
if (valore=="offerta"){
nomepag="tariffe.htm";
document.write ('<frame name="inferioredx" src="' + nomepag + '" target="_self">\n');
}
else{
nomepag="principale.htm";
document.write ("<frame name='inferioredx' src=" + nomepag + " target='_self'>");
};
document.write ('</frameset>');
</script>