Buongiorno a tutti, è la prima volata che posto in questo forum.
Ho un piccolo problema con finestre frame e form.
Ho uno scriptino che su IE funziona e su mozilla no...
Lo script dovrebbe aprire il risultato di un form (e anche di un link) all'interno di un frameset, all'interno di una nuova finestra.
Nello specifico, mentre con IE è tutto ok, con mozilla la nuova finestra con il frameset viene correttamente aperta (pagina search.php, attributo name=hotels) ma sia il risultato del form che il link vengono aperti in una terza finestra (quella dell'url reale).
L'url è http://www.hotelsrome.ws/rome-vacation-packages.php
La sintesi dello script è questa:
//per il form:
<script language="JavaScript">
if (top.frames.name!='hotels') {
document.write('<FORM NAME=frmPackages ACTION="http://vacations.ian.com/pubspec/scripts/eap.asp" METHOD=GET onSubmit="javascript:return my();" target="ma">')
} else {
document.write('<FORM NAME=frmPackages ACTION="http://vacations.ian.com/pubspec/scripts/eap.asp" METHOD=GET>')
}
</script>
//per un link
<script language="JavaScript">
if (top.frames.name!='hotels') {
document.write(' <a href="http://vacations.ian.com/pubspec/scripts/eap.asp?goto=pkglaunch&eapid=<?php echo $eap;?>-30024&packageType=1" onClick="javascript:return my();" target="ma">More destinations & options</a>')
} else {
document.write(' <a href="http://vacations.ian.com/pubspec/scripts/eap.asp?goto=pkglaunch&eapid=<?php echo $eap;?>-30024&packageType=1">More destinations & options</a>')
}frames['testiframe'].location
</script>
// per la function my()
function my() {
if (top.frames.name!='hotels')
{
searchWin = window.open("search.php","hotels","width="+(screen.width-10)+",height="+(screen.height-200)+",left=0,top=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,status=yes,location=yes");
searchWin.focus();
}
}
Ho un piccolo problema con finestre frame e form.
Ho uno scriptino che su IE funziona e su mozilla no...
Lo script dovrebbe aprire il risultato di un form (e anche di un link) all'interno di un frameset, all'interno di una nuova finestra.
Nello specifico, mentre con IE è tutto ok, con mozilla la nuova finestra con il frameset viene correttamente aperta (pagina search.php, attributo name=hotels) ma sia il risultato del form che il link vengono aperti in una terza finestra (quella dell'url reale).
L'url è http://www.hotelsrome.ws/rome-vacation-packages.php
La sintesi dello script è questa:
//per il form:
<script language="JavaScript">
if (top.frames.name!='hotels') {
document.write('<FORM NAME=frmPackages ACTION="http://vacations.ian.com/pubspec/scripts/eap.asp" METHOD=GET onSubmit="javascript:return my();" target="ma">')
} else {
document.write('<FORM NAME=frmPackages ACTION="http://vacations.ian.com/pubspec/scripts/eap.asp" METHOD=GET>')
}
</script>
//per un link
<script language="JavaScript">
if (top.frames.name!='hotels') {
document.write(' <a href="http://vacations.ian.com/pubspec/scripts/eap.asp?goto=pkglaunch&eapid=<?php echo $eap;?>-30024&packageType=1" onClick="javascript:return my();" target="ma">More destinations & options</a>')
} else {
document.write(' <a href="http://vacations.ian.com/pubspec/scripts/eap.asp?goto=pkglaunch&eapid=<?php echo $eap;?>-30024&packageType=1">More destinations & options</a>')
}frames['testiframe'].location
</script>
// per la function my()
function my() {
if (top.frames.name!='hotels')
{
searchWin = window.open("search.php","hotels","width="+(screen.width-10)+",height="+(screen.height-200)+",left=0,top=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,status=yes,location=yes");
searchWin.focus();
}
}