par
jp.kerloch » 12 févr. 2008, 15:25
Bonjour a toutes et a tous.
Je recherche une solution qui me permettrait de supprimer les popup.
Pourriez vous m'aider.
Je vous livre mon code source ..
<?
//include("../admin/bdd_init.php5");
include("../hydrus/hydrus.php5");
include("site_id.php5");
if(isset($_POST['pays']) ==false)
{
$_POST['pays'] = "France";
}
if(isset($_POST['button']) == true)
{
$search = 1;
}
else
{
$search = 0;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Corolle</title>
<link href="../css/site.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body class="arriere_plan"
<?
if($search == 1 )
{
print(" onLoad=\"MM_openBrWindow('distribution2.php5?pays=".$_POST['pays']."&departement=".$_POST['dep']."&cp=".$_POST['cp']."','resultatdistribution','scrollbars=yes,width=540,height=540')\"");
}
?> >
<div id="plan" style="position:absolute; left:592px; top:575px; width:76px; height:17px; z-index:1; visibility: visible;"><a href="plan.php5"><img src="../images/pixel_transparent.gif" alt="Plan du site" width="76px" height="17px" border="0" ></a></div>
<div id="accueil" style="position:absolute; left:683px; top:575px; width:106px; height:17px; z-index:2; visibility: visible;"><a href="index.php5"><img src="../images/pixel_transparent.gif" alt="Retour à la page d'accueil" width="106px" height="17px" border="0"></a></div>
<div id="menusociete" style="position:absolute; left:8px; top:185px; width:204px; height:40px; z-index:3; visibility: hidden;" onClick="MM_showHideLayers('menusociete','','hide')" onMouseOver="MM_showHideLayers('menusociete','','show')" onMouseOut="MM_showHideLayers('menusociete','','hide')">
<table width="205" border="0">
<tr>
<td width="217" class="menu"><a href="creation.php5" class="societe">Qui sommes nous </a></td>
</tr>
<tr>
<td class="menu"><a href="jouer.php5" class="societe">Pourquoi offrir une poupée Corolle</a> </td>
</tr>
</table>
</div>
<div id="menuservices" style="position:absolute; left:615px; top:185px; width:184px; height:43px; z-index:6; visibility: hidden;" onClick="MM_showHideLayers('menuservices','','hide')" onMouseOver="MM_showHideLayers('menuservices','','show')" onMouseOut="MM_showHideLayers('menuservices','','hide')">
<table width="184" border="0">
<tr>
<td class="menu"><a href="doudou.php5" class="service">Rechercher un doudou Corolle </a></td>
</tr>
<tr>
<td class="menu"><a href="sav.php5" class="service">Réparer un produit</a></td>
</tr>
<tr>
<td class="service"><a href="passeport.php5" class="service">Obtenir son passeport Corolle </a></td>
</tr>
<tr>
<td class="menu"><a href="conso.php5" class="service">Nous poser une question </a></td>
</tr>
</table>
</div>
<div id="societe" style="position:absolute; left:30px; top:76px; width:114px; height:110px; z-index:7; visibility: visible;" onClick="MM_showHideLayers('menusociete','','hide')" onMouseOver="MM_showHideLayers('menusociete','','show')" onMouseOut="MM_showHideLayers('menusociete','','hide')" class="sans_rien"><a href="creation.php5"><img src="../images/pixel_transparent.gif" alt="Une marque unique" width="114" height="110" border="0"></a></div>
<div id="produit" style="position:absolute; left:242px; top:76px; width:109px; height:110px; z-index:8; visibility: visible;" onClick="MM_showHideLayers('menuproduit','','hide')" onMouseOut="MM_showHideLayers('menuproduit','','hide')" onMouseOver="MM_showHideLayers('menuproduit','','show')" class="sans_rien"><a href="toise.php5"><img src="../images/pixel_transparent.gif" alt="Choisir un produit" width="109" height="110" border="0"></a></div>
<div id="services" style="position:absolute; left:653px; top:76px; width:119px; height:110px; z-index:10; visibility: visible;" onClick="MM_showHideLayers('menuservices','','hide')" onMouseOut="MM_showHideLayers('menuservices','','hide')" onMouseOver="MM_showHideLayers('menuservices','','show')" class="sans_rien"><a href="doudou.php5"><img src="../images/pixel_transparent.gif" alt="Corolle à votre service" width="119" height="110" border="0"></a></div>
<div id="Layer1" style="position:absolute; left:208px; top:343px; width:335px; height:148px; z-index:11; visibility: visible;">
<form name="form1" method="post" action="distribution.php5" >
<table width="335" height="131" border="0" align="left">
<tr>
<td class="texte_formulaire2">Votre pays : </td>
<td> <center>
<select name="pays" size="1" class="reponse_formulaire" onChange="form1.submit()">
<?
$requete_txt = "SELECT DISTINCT mag_pays FROM `corolle_magasin` WHERE site_id = ".$site_id."";
$result_pays = $bdd->result_to_array($bdd->query($requete_txt));
for($i=0;$i<count($result_pays);$i++)
{
if($result_pays[$i][0] != "")
{
if($_POST['pays'] == $result_pays[$i][0])
{
print("<option value='".$result_pays[$i][0]."' selected>".$result_pays[$i][0]."</option>");
}
else
{
print("<option value='".$result_pays[$i][0]."' >".$result_pays[$i][0]."</option>");
}
}
}
?>
</select>
</center>
</td>
</tr>
<tr>
<td class="texte_formulaire2">Votre département : </td>
<td><center>
<?
$requete_txt = "SELECT DISTINCT mag_etat FROM `corolle_magasin` WHERE `mag_pays` = '".$_POST['pays']."' AND site_id = ".$site_id." ORDER BY mag_cp ASC";
$result_departement = $bdd->result_to_array($bdd->query($requete_txt));
//print("Requete : ". $requete_txt);
if(count($result_departement) <= 0)
{
print("<select name='dep' class='reponse_formulaire' DISABLED> ");
}
else
{
print("<select name='dep' class='reponse_formulaire'>");
for($i = 0 ; $i < count($result_departement) ; $i ++)
{
if($result_departement[$i][0] != "")
{
if($_POST['pays'] == "France")
{
$requete_txt = "SELECT DISTINCT mag_cp FROM `corolle_magasin` WHERE `mag_pays` = '".$_POST['pays']."' AND site_id = ".$site_id." AND mag_etat='".addslashes($result_departement[$i][0])."'";
//print($requete_txt);
$result_cp = $bdd->result_to_array($bdd->query($requete_txt));
print("<option value=\"".stripslashes($result_departement[$i][0])."\">".$result_cp[0][0][0]."".$result_cp[0][0][1]." - ".stripslashes($result_departement[$i][0])."</option>");
}
else
{
print("<option value=\"".stripslashes($result_departement[$i][0])."\">".stripslashes($result_departement[$i][0])."</option>");
}
}
}
}
?>
</select>
</center></td>
</tr>
<tr>
<td class="texte_formulaire2">Votre code postal : </td>
<td> <center><input name="cp" type="text" size="6" ></center></td>
</tr>
<tr>
<td colspan="2"><div align="center">
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="button" class="recherche_contact" value="Envoyer" >
</div></td>
</tr>
</table>
</form>
</div>
<div id="Layer2" style="position:absolute; left:207px; top:267px; width:485px; height:46px; z-index:12">
<p class="texte">Vous désirez connaître l'adresse du magasin le plus proche de chez vous ?<br>
<br>
Merci d’indiquer :</p>
</div>
<table width="813" height="610" border="0" cellpadding="0" cellspacing="0" class="fond_distribution">
<tr>
<td width="813" height="610" class="menu"><div id="menucontact" style="position:absolute; left:9px; top:267px; width:149px; height:101px; z-index:11; visibility: visible;">
<table width="162" height="106" border="0">
<tr>
<td width="240" height="30" class="menucontact">Où nous trouver ? </td>
</tr>
<tr>
<td height="36" class="societe"><div align="center" class="menu_noustrouver">Trouver un magasin </div></td>
</tr>
<tr>
<td class="societe"><div align="center" class="navigation"><a href="contact.php5" class="navigation">Nous contacter </a></div></td>
</tr>
</table>
</div>
<div id="menuproduit" style="position:absolute; left:232px; top:185px; width:180px; height:33px; z-index:4; visibility: hidden;" onClick="MM_showHideLayers('menuproduit','','show')" onMouseOut="MM_showHideLayers('menuproduit','','hide')" onMouseOver="MM_showHideLayers('menuproduit','','show')">
<table width="180" border="0">
<tr>
<td class="produits"><a href="toise.php5" class="produits">Par âge</a></td>
</tr>
<tr>
<td class="produits"><a href="gammes.php5" class="produits">Par gamme</a></td>
</tr>
<tr>
<td class="produits"><a href="rechercher.php5" class="produits">Par mot-clé ou par référence</a><a href="#" class="menu"> </a></td>
</tr>
</table>
</div></td>
</tr>
</table>
</body>
</html>
voici le morceau de code qui me permet de generer ce pop up
<?
if($search == 1 )
{
print(" onLoad=\"MM_openBrWindow('distribution2.php5?pays=".$_POST['pays']."&departement=".$_POST['dep']."&cp=".$_POST['cp']."','resultatdistribution','scrollbars=yes,width=540,height=540')\"");
}
?>
Merci de m'aider a trouver comment faire pour supprimer ce pop up et le mettre en NOUVELLE FENETRE
Merci a touss
Bonjour a toutes et a tous.
Je recherche une solution qui me permettrait de supprimer les popup.
Pourriez vous m'aider.
Je vous livre mon code source ..
[php]<?
//include("../admin/bdd_init.php5");
include("../hydrus/hydrus.php5");
include("site_id.php5");
if(isset($_POST['pays']) ==false)
{
$_POST['pays'] = "France";
}
if(isset($_POST['button']) == true)
{
$search = 1;
}
else
{
$search = 0;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Corolle</title>
<link href="../css/site.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body class="arriere_plan"
<?
if($search == 1 )
{
print(" onLoad=\"MM_openBrWindow('distribution2.php5?pays=".$_POST['pays']."&departement=".$_POST['dep']."&cp=".$_POST['cp']."','resultatdistribution','scrollbars=yes,width=540,height=540')\"");
}
?> >
<div id="plan" style="position:absolute; left:592px; top:575px; width:76px; height:17px; z-index:1; visibility: visible;"><a href="plan.php5"><img src="../images/pixel_transparent.gif" alt="Plan du site" width="76px" height="17px" border="0" ></a></div>
<div id="accueil" style="position:absolute; left:683px; top:575px; width:106px; height:17px; z-index:2; visibility: visible;"><a href="index.php5"><img src="../images/pixel_transparent.gif" alt="Retour à la page d'accueil" width="106px" height="17px" border="0"></a></div>
<div id="menusociete" style="position:absolute; left:8px; top:185px; width:204px; height:40px; z-index:3; visibility: hidden;" onClick="MM_showHideLayers('menusociete','','hide')" onMouseOver="MM_showHideLayers('menusociete','','show')" onMouseOut="MM_showHideLayers('menusociete','','hide')">
<table width="205" border="0">
<tr>
<td width="217" class="menu"><a href="creation.php5" class="societe">Qui sommes nous </a></td>
</tr>
<tr>
<td class="menu"><a href="jouer.php5" class="societe">Pourquoi offrir une poupée Corolle</a> </td>
</tr>
</table>
</div>
<div id="menuservices" style="position:absolute; left:615px; top:185px; width:184px; height:43px; z-index:6; visibility: hidden;" onClick="MM_showHideLayers('menuservices','','hide')" onMouseOver="MM_showHideLayers('menuservices','','show')" onMouseOut="MM_showHideLayers('menuservices','','hide')">
<table width="184" border="0">
<tr>
<td class="menu"><a href="doudou.php5" class="service">Rechercher un doudou Corolle </a></td>
</tr>
<tr>
<td class="menu"><a href="sav.php5" class="service">Réparer un produit</a></td>
</tr>
<tr>
<td class="service"><a href="passeport.php5" class="service">Obtenir son passeport Corolle </a></td>
</tr>
<tr>
<td class="menu"><a href="conso.php5" class="service">Nous poser une question </a></td>
</tr>
</table>
</div>
<div id="societe" style="position:absolute; left:30px; top:76px; width:114px; height:110px; z-index:7; visibility: visible;" onClick="MM_showHideLayers('menusociete','','hide')" onMouseOver="MM_showHideLayers('menusociete','','show')" onMouseOut="MM_showHideLayers('menusociete','','hide')" class="sans_rien"><a href="creation.php5"><img src="../images/pixel_transparent.gif" alt="Une marque unique" width="114" height="110" border="0"></a></div>
<div id="produit" style="position:absolute; left:242px; top:76px; width:109px; height:110px; z-index:8; visibility: visible;" onClick="MM_showHideLayers('menuproduit','','hide')" onMouseOut="MM_showHideLayers('menuproduit','','hide')" onMouseOver="MM_showHideLayers('menuproduit','','show')" class="sans_rien"><a href="toise.php5"><img src="../images/pixel_transparent.gif" alt="Choisir un produit" width="109" height="110" border="0"></a></div>
<div id="services" style="position:absolute; left:653px; top:76px; width:119px; height:110px; z-index:10; visibility: visible;" onClick="MM_showHideLayers('menuservices','','hide')" onMouseOut="MM_showHideLayers('menuservices','','hide')" onMouseOver="MM_showHideLayers('menuservices','','show')" class="sans_rien"><a href="doudou.php5"><img src="../images/pixel_transparent.gif" alt="Corolle à votre service" width="119" height="110" border="0"></a></div>
<div id="Layer1" style="position:absolute; left:208px; top:343px; width:335px; height:148px; z-index:11; visibility: visible;">
<form name="form1" method="post" action="distribution.php5" >
<table width="335" height="131" border="0" align="left">
<tr>
<td class="texte_formulaire2">Votre pays : </td>
<td> <center>
<select name="pays" size="1" class="reponse_formulaire" onChange="form1.submit()">
<?
$requete_txt = "SELECT DISTINCT mag_pays FROM `corolle_magasin` WHERE site_id = ".$site_id."";
$result_pays = $bdd->result_to_array($bdd->query($requete_txt));
for($i=0;$i<count($result_pays);$i++)
{
if($result_pays[$i][0] != "")
{
if($_POST['pays'] == $result_pays[$i][0])
{
print("<option value='".$result_pays[$i][0]."' selected>".$result_pays[$i][0]."</option>");
}
else
{
print("<option value='".$result_pays[$i][0]."' >".$result_pays[$i][0]."</option>");
}
}
}
?>
</select>
</center>
</td>
</tr>
<tr>
<td class="texte_formulaire2">Votre département : </td>
<td><center>
<?
$requete_txt = "SELECT DISTINCT mag_etat FROM `corolle_magasin` WHERE `mag_pays` = '".$_POST['pays']."' AND site_id = ".$site_id." ORDER BY mag_cp ASC";
$result_departement = $bdd->result_to_array($bdd->query($requete_txt));
//print("Requete : ". $requete_txt);
if(count($result_departement) <= 0)
{
print("<select name='dep' class='reponse_formulaire' DISABLED> ");
}
else
{
print("<select name='dep' class='reponse_formulaire'>");
for($i = 0 ; $i < count($result_departement) ; $i ++)
{
if($result_departement[$i][0] != "")
{
if($_POST['pays'] == "France")
{
$requete_txt = "SELECT DISTINCT mag_cp FROM `corolle_magasin` WHERE `mag_pays` = '".$_POST['pays']."' AND site_id = ".$site_id." AND mag_etat='".addslashes($result_departement[$i][0])."'";
//print($requete_txt);
$result_cp = $bdd->result_to_array($bdd->query($requete_txt));
print("<option value=\"".stripslashes($result_departement[$i][0])."\">".$result_cp[0][0][0]."".$result_cp[0][0][1]." - ".stripslashes($result_departement[$i][0])."</option>");
}
else
{
print("<option value=\"".stripslashes($result_departement[$i][0])."\">".stripslashes($result_departement[$i][0])."</option>");
}
}
}
}
?>
</select>
</center></td>
</tr>
<tr>
<td class="texte_formulaire2">Votre code postal : </td>
<td> <center><input name="cp" type="text" size="6" ></center></td>
</tr>
<tr>
<td colspan="2"><div align="center">
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="button" class="recherche_contact" value="Envoyer" >
</div></td>
</tr>
</table>
</form>
</div>
<div id="Layer2" style="position:absolute; left:207px; top:267px; width:485px; height:46px; z-index:12">
<p class="texte">Vous désirez connaître l'adresse du magasin le plus proche de chez vous ?<br>
<br>
Merci d’indiquer :</p>
</div>
<table width="813" height="610" border="0" cellpadding="0" cellspacing="0" class="fond_distribution">
<tr>
<td width="813" height="610" class="menu"><div id="menucontact" style="position:absolute; left:9px; top:267px; width:149px; height:101px; z-index:11; visibility: visible;">
<table width="162" height="106" border="0">
<tr>
<td width="240" height="30" class="menucontact">Où nous trouver ? </td>
</tr>
<tr>
<td height="36" class="societe"><div align="center" class="menu_noustrouver">Trouver un magasin </div></td>
</tr>
<tr>
<td class="societe"><div align="center" class="navigation"><a href="contact.php5" class="navigation">Nous contacter </a></div></td>
</tr>
</table>
</div>
<div id="menuproduit" style="position:absolute; left:232px; top:185px; width:180px; height:33px; z-index:4; visibility: hidden;" onClick="MM_showHideLayers('menuproduit','','show')" onMouseOut="MM_showHideLayers('menuproduit','','hide')" onMouseOver="MM_showHideLayers('menuproduit','','show')">
<table width="180" border="0">
<tr>
<td class="produits"><a href="toise.php5" class="produits">Par âge</a></td>
</tr>
<tr>
<td class="produits"><a href="gammes.php5" class="produits">Par gamme</a></td>
</tr>
<tr>
<td class="produits"><a href="rechercher.php5" class="produits">Par mot-clé ou par référence</a><a href="#" class="menu"> </a></td>
</tr>
</table>
</div></td>
</tr>
</table>
</body>
</html>
[/php]
voici le morceau de code qui me permet de generer ce pop up
[php]<?
if($search == 1 )
{
print(" onLoad=\"MM_openBrWindow('distribution2.php5?pays=".$_POST['pays']."&departement=".$_POST['dep']."&cp=".$_POST['cp']."','resultatdistribution','scrollbars=yes,width=540,height=540')\"");
}
?>[/php]
Merci de m'aider a trouver comment faire pour supprimer ce pop up et le mettre en NOUVELLE FENETRE :)
Merci a touss