dans mon code javascript g un fichier php qui se lance en pop up je veux un script qui sert a fermer automatikement le pop up apres X secondes voila mon code :
<head>
<script language="javascript" type="text/javascript">
function popup_confirm(the_form) {
my_form = eval(the_form)
window.open("./send1.php", "popup", "height=300,width=500,menubar='no',toolbar='no',location='no',status='no',scrollbars='no'");
my_form.target = "popup";
my_form.submit();
}
</script>


ici j'apelle le pop up sur le button envoyer

<td width="37%"><input name="envoyer" type="submit" class="Style8" id="envoyer" value="Envoyer" onclick="popup_confirm(form1);" /></td>
</tr>
</table>
</form>

donc voila si quelqu'un peut m'aider et j'espère que j'etais clair .
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript">
function popup_confirm(the_form) {
my_form = eval(the_form)
window.open("./send1.php", "popup", "height=300,width=500,menubar='no',toolbar='no',location='no',status='no',scrollbars='no',resizable='no'");
my_form.target = "popup";
my_form.submit();
}
</script>
<LINK REL="SHORTCUT ICON" href="favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>contact</title>
<style type="text/css">
<!--
body {
background-color: #252525;
background-image: url();
}
.Style2 { font-family: "Eras Demi ITC";
color: #666666;
font-size: 12px;
}
.Style5 { color: #999999;
font-size: 11px;
}
.Style7 {font-family: "Eras Demi ITC"; font-size: 15px; color: #999999; }
.Style8 {font-family: "Eras Demi ITC"; font-size: 15px; color: #333333; }
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('imgsite/acceuil1.png','imgsite/hdesign1.png','imgsite/portfolio1.png','imgsite/contact.png')">
<table width="1200" border="0" align="center">
<tr>
<td width="315" rowspan="2" valign="top">&nbsp;</td>
<td width="556" height="68" valign="top">&nbsp;</td>
<td width="315" rowspan="2" valign="top">&nbsp;</td>
</tr>
<tr>
<td height="485" valign="top"><table width="100%" border="0">
<tr>
<td width="5%">&nbsp;</td>
<td width="91%" background="texturehaut.jpg"><table width="100%" border="0">
<tr>
<td width="16%" height="21"><a href="accueil.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('acceuil','','imgsite/acceuil1.png',1)"><img src="imgsite/acceuil.png" alt="acceuil" name="acceuil" width="76" height="25" border="0" id="acceuil" /></a></td>
<td width="17%"><a href="h-design.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('h-design','','imgsite/hdesign1.png',1)"><img src="imgsite/hdesign.png" alt="hdesign" name="h-design" width="76" height="25" border="0" id="h-design" /></a></td>
<td width="16%"><a href="portfolio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('portfolio','','imgsite/portfolio1.png',1)"><img src="imgsite/portfolio.png" alt="portfolio" name="portfolio" width="76" height="25" border="0" id="portfolio" /></a></td>
<td width="35%">&nbsp;</td>
<td width="16%"><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','imgsite/contact.png',1)"><img src="imgsite/contact1.png" alt="contact" name="contact" width="76" height="25" border="0" id="contact" /></a></td>
</tr>
</table></td>
<td width="4%">&nbsp;</td>
</tr>
</table>
<table width="550" border="0">
<tr>
<td width="556" valign="top"><table width="100%" border="0" bordercolor="#0A0A0A">

<tr>
<td align="left" valign="top"><img src="imgsite/pagecontact.jpg" width="550" height="229" />
<table width="100%" border="1" bordercolor="#333333">
<tr>
<td valign="top"><form action="send1.php" method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="4">
<tr>
<td width="16%"><span class="Style7">Nom :</span></td>
<td colspan="2"><label>
<input name="nom" type="text" class="Style8" id="nom" />
</label></td>
</tr>
<tr>
<td class="Style7">E-mail :</td>
<td colspan="2"><label>
<input name="email" type="text" class="Style8" id="email" />
</label></td>
</tr>
<tr>
<td class="Style7">adresse :</td>
<td colspan="2"><label>
<input name="adresse" type="text" class="Style8" id="adresse" />
</label></td>
</tr>
<tr>
<td class="Style7">Message :</td>
<td colspan="2"><label>
<textarea name="message" cols="45" rows="5" class="Style8" id="message"></textarea>
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="47%"><label></label></td>
<td width="37%"><td width="37%"><input name="envoyer" type="submit" class="Style8" id="envoyer" value="Envoyer" onclick="popup_confirm(form1);" /></td>
</tr>
</table>
</form>
</td>
</body>
</html>
[/i][/i][/i][/i][/i]
Salut et bienvenue parmi nous Smiley smile

En tant que modérateur, je me dois de te faire remarquer que tu n'as malheureusement pas respecté l'une des Règles de base du forum qui est d'afficher les codes et exemples proprement à l'aide des boutons [ code]... ici ton code HTML, CSS, PHP, etc.[ /code] (sans espace).

Je te remercie par avance de bien vouloir éditer ton message afin de le rendre conforme à cette règle. Smiley cligne

D'ailleurs, je rappelle que le lien qui apparaît en bandeau tout en haut du forum ("Nouveau sur le forum ?...") est important. Il contient des pistes de recherche, des indications sur les règles de vie de la communauté, etc.
Il serait courtois de ta part de bien vouloir en prendre connaissance.

Bonne continuation Smiley smile

upload/1-code.gif
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript">
function popup_confirm(the_form) {
my_form = eval(the_form)
window.open("./send1.php", "popup", "height=300,width=500,menubar='no',toolbar='no',location='no',status='no',scrollbars='no',resizable='no'");
my_form.target = "popup";
my_form.submit();
}
</script>
<LINK REL="SHORTCUT ICON" href="favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>contact</title>
<style type="text/css">
<!--
body {
background-color: #252525;
background-image: url();
}
.Style2 { font-family: "Eras Demi ITC";
color: #666666;
font-size: 12px;
}
.Style5 { color: #999999;
font-size: 11px;
}
.Style7 {font-family: "Eras Demi ITC"; font-size: 15px; color: #999999; }
.Style8 {font-family: "Eras Demi ITC"; font-size: 15px; color: #333333; }
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('imgsite/acceuil1.png','imgsite/hdesign1.png','imgsite/portfolio1.png','imgsite/contact.png')">
<table width="1200" border="0" align="center">
<tr>
<td width="315" rowspan="2" valign="top">&nbsp;</td>
<td width="556" height="68" valign="top">&nbsp;</td>
<td width="315" rowspan="2" valign="top">&nbsp;</td>
</tr>
<tr>
<td height="485" valign="top"><table width="100%" border="0">
<tr>
<td width="5%">&nbsp;</td>
<td width="91%" background="texturehaut.jpg"><table width="100%" border="0">
<tr>
<td width="16%" height="21"><a href="accueil.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('acceuil','','imgsite/acceuil1.png',1)"><img src="imgsite/acceuil.png" alt="acceuil" name="acceuil" width="76" height="25" border="0" id="acceuil" /></a></td>
<td width="17%"><a href="h-design.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('h-design','','imgsite/hdesign1.png',1)"><img src="imgsite/hdesign.png" alt="hdesign" name="h-design" width="76" height="25" border="0" id="h-design" /></a></td>
<td width="16%"><a href="portfolio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('portfolio','','imgsite/portfolio1.png',1)"><img src="imgsite/portfolio.png" alt="portfolio" name="portfolio" width="76" height="25" border="0" id="portfolio" /></a></td>
<td width="35%">&nbsp;</td>
<td width="16%"><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','imgsite/contact.png',1)"><img src="imgsite/contact1.png" alt="contact" name="contact" width="76" height="25" border="0" id="contact" /></a></td>
</tr>
</table></td>
<td width="4%">&nbsp;</td>
</tr>
</table>
<table width="550" border="0">
<tr>
<td width="556" valign="top"><table width="100%" border="0" bordercolor="#0A0A0A">

<tr>
<td align="left" valign="top"><img src="imgsite/pagecontact.jpg" width="550" height="229" />
<table width="100%" border="1" bordercolor="#333333">
<tr>
<td valign="top"><form action="send1.php" method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="4">
<tr>
<td width="16%"><span class="Style7">Nom :</span></td>
<td colspan="2"><label>
<input name="nom" type="text" class="Style8" id="nom" />
</label></td>
</tr>
<tr>
<td class="Style7">E-mail :</td>
<td colspan="2"><label>
<input name="email" type="text" class="Style8" id="email" />
</label></td>
</tr>
<tr>
<td class="Style7">adresse :</td>
<td colspan="2"><label>
<input name="adresse" type="text" class="Style8" id="adresse" />
</label></td>
</tr>
<tr>
<td class="Style7">Message :</td>
<td colspan="2"><label>
<textarea name="message" cols="45" rows="5" class="Style8" id="message"></textarea>
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="47%"><label></label></td>
<td width="37%"><td width="37%"><input name="envoyer" type="submit" class="Style8" id="envoyer" value="Envoyer" onclick="popup_confirm(form1);" /></td>
</tr>
</table>
</form>
</td>
</body>
</html>
[code=javascript]
[/code][code][i]
[/i][/i][/i][/i][/i]
Salut,

Non toujours pas, essaye encore, pourtant c'est bien expliqué dans le lien et l'image que je t'ai donné. Smiley cligne