[HTML]fermeture popup apès x secondes?

Fermé
AïePhone - 2 avril 2010 à 10:03
 AïePhone - 2 avril 2010 à 10:52
Bonjour à tous, donc je vous fait un petit topo...

Je dois créer une page (pas trop compliqué jusque là ca va : P ) où j'ai un lien0 vers une caméra ip.(ca va aussi)

Donc jusque là pas de soucis, ensuite, mon lien lance une popup qui affiche la caméra...

Jusque là tout va bien...Les ennuis commencent lorsque je dois me débrouiller pour que mon popup(si on peut appeler ça ainsi) se ferme automatiquement au bout de 20 secondes...
Là je sèche totalement, je ne connaissais rien sur l'HTML il y a 3 jours (je suis stagiaire et ce projet n'était pas prévu pour moi), je me suis gavé de tutos mais je ne trouve pas solution à mon soucis : /

Si quelqu'un pouvait m'aider ce serais géniale ; )

Voici mon code html au cas ou...(c'est laid mais je veux juste que cela fonctionne, on verra le joli plus tard)
ma page "projet"


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
   <head>
		

 

       <title>Campéra. police domaniale.</title>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<link rel="stylesheet" type="text/css" media="all" href="base.css" />
		<link rel="stylesheet" type="text/css" media="all" href="base2.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
   </head>
 
   <body>
		<h1>test camera</h1>
		<a href="#" onClick="window.open('test.html','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=330, height=250');return(false)">test</a> 

   </body>
</html>




_____________________________________________________________

ma page "test"




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
		<title>Gestion Camera Mobile</title>
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" type="text/css" media="all" href="css/base.css" />
		<link rel="stylesheet" type="text/css" media="all" href="css/base2.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />

		</head>


<BODY>
		<OBJECT ID="AxisCamControl" CLASSID="CLSID:917623D1-D8E5-11D2-BE8B-00104B06BDE3" WIDTH="320" HEIGHT="240" CODEBASE="http://157.164.95.212/activex/AxisCamControl.cab#Version=2,23,0,0">
			<PARAM NAME=DisplaySoundPanel VALUE=0>
			<PARAM NAME=URL VALUE="http://157.164.95.212/axis-cgi/mjpg/video.cgi?camera=&resolution=320x240">
        </OBJECT>
		<!--<applet archive="http://157.164.95.212/java/AxisCamApplet.zip" codeBase="http://157.164.95.212/java/" code="http://157.164.95.212/java/AxisCamApplet.class" height="320" width="240">
		<param name="StreamLocation" value="http://157.164.95.212/axis-cgi/mjpg/video.cgi?camera=&showlength=1&resolution=640x480">
		</applet>-->
	</body>
</html>



____________________________________________________________

C'est grave docteur? ="(
A voir également:

1 réponse

problème résolu !

pour ceux qui se poseraient des questions par la suite il suffit d'insérer:

"<body onload="window.setTimeout('self.close()',5000)"> "

dans le "popup".

voilà le code complet pour faire un bon exemple.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
		<title>Gestion Camera Mobile</title>
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" type="text/css" media="all" href="css/base.css" />
		<link rel="stylesheet" type="text/css" media="all" href="css/base2.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />

		</head>


<body onload="window.setTimeout('self.close()',5000)"> 

		<OBJECT ID="AxisCamControl" CLASSID="CLSID:917623D1-D8E5-11D2-BE8B-00104B06BDE3" WIDTH="320" HEIGHT="240" CODEBASE="http://157.164.95.212/activex/AxisCamControl.cab#Version=2,23,0,0">
			<PARAM NAME=DisplaySoundPanel VALUE=0>
			<PARAM NAME=URL VALUE="http://157.164.95.212/axis-cgi/mjpg/video.cgi?camera=&resolution=320x240">
        </OBJECT>
		<!--<applet archive="http://157.164.95.212/java/AxisCamApplet.zip" codeBase="http://157.164.95.212/java/" code="http://157.164.95.212/java/AxisCamApplet.class" height="320" width="240">
		<param name="StreamLocation" value="http://157.164.95.212/axis-cgi/mjpg/video.cgi?camera=&showlength=1&resolution=640x480">
		</applet>-->
	</body>
</html>

1