IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Redirection taille fenêtre


Sujet :

JavaScript

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    386
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 386
    Points : 90
    Points
    90
    Par défaut Redirection taille fenêtre
    bonjour a tous,
    Je rencontre un probleme avec le code php.
    Voila la situation, j'entre sur une adresse donné, je suis automatiquement redirectionné vers une autre page, or je voudrais que cette page redirectionné soit en full screen, mais comment faire, j'ai d'abord ecris ce code en html mais sans succes :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    <html>
    <head>
     
    <title>yuyu</title>
    <meta name="description" content="yuyu">
    <meta name="keywords" content="yuyu">
    <meta name="language" content="français">
    <meta name="author" content="yuyu">
    <meta name="reply-to" content="yuyu">
    <meta name="robots" content="all">
    <meta http-equiv="refresh" content="0; URL=yuyu.fr">
    </head>
     
    <body>
    </body>
     
    </html>

    comment proceder si la solution existe ?

  2. #2
    Membre actif Avatar de Mogwaï
    Inscrit en
    Mai 2004
    Messages
    247
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Mai 2004
    Messages : 247
    Points : 278
    Points
    278
    Par défaut
    Bonjour,

    Ton problème n'a pas grand chose à voir avec PHP mais plutot avec le HTML...

    Il ne me semble pas qu'il soit possible de faire ce que tu souhaites.
    Tu peux par contre faire un lien "ouvrir en pleine taille" qui declencherait un open javascript ouvrant une nouvelle fenetre qui elle serait en pleine taille

  3. #3
    Membre émérite Avatar de Madfrix
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 326
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 326
    Points : 2 566
    Points
    2 566
    Par défaut
    Salut

    Pourquoi ne redimensionnes tu pas ta fenetre via la fonction Javascript resizeTo() ?

  4. #4
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    386
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 386
    Points : 90
    Points
    90
    Par défaut
    Bah le probleme c'est que je ne sais pas comment integrer le code :-(
    Surtout que je dois mettre de code dans la derniere balise , ou alors tout refaire en php mais bon je ne sais pas le coder

  5. #5
    Membre émérite Avatar de Madfrix
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 326
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 326
    Points : 2 566
    Points
    2 566
    Par défaut
    Dans du code HTML :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <script language="JavaScript">
    window.resizeTo(screen.width,screen.height);
    </script>
    Dans du PHP :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    echo "<script language=\"JavaScript\">
    window.resizeTo(screen.width,screen.height);
    </script>";

    Cela devrait marcher avec ça

  6. #6
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    386
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 386
    Points : 90
    Points
    90
    Par défaut
    re bonjour, je ne comprend pas comment inserer ce code oO

  7. #7
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    386
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 386
    Points : 90
    Points
    90
    Par défaut
    <html>
    <head>

    <title>yuyu</title>
    <meta name="description" content="yuyu">
    <meta name="keywords" content="yuyu">
    <meta name="language" content="français">
    <meta name="author" content="yuyu">
    <meta name="reply-to" content="yuyu">
    <meta name="robots" content="all">
    <meta http-equiv="refresh" content="0; URL=yuyu.fr">
    </head>
    echo "<script language=\"JavaScript\">
    window.resizeTo(screen.width,screen.height);
    </script>";
    <body>
    </body>

    </html>

    ??

  8. #8
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    386
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 386
    Points : 90
    Points
    90
    Par défaut
    personne? meme si je m'apercois que ma question est stupide :s

  9. #9
    Membre émérite Avatar de Madfrix
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 326
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 326
    Points : 2 566
    Points
    2 566
    Par défaut
    C'est normal tu ne peux pas insérer du php dans du HTML sans déclarer que tu utilises du PHP (ton fichier doit aussi comporter l'extension .php):

    ton_fichier.php :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
     
    <HTML>
     
    <HEAD>
     
    <?php
    ton code php ici
    ?>
     
    </HEAD>
     
    <BODY>
    ...
    ..
    .
    </BODY>
     
    </HTML>
    Essaie cela et ça devrait marcher

  10. #10
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    386
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 386
    Points : 90
    Points
    90
    Par défaut
    oulala je galere comme pas permis pour ce probleme, je vais vous coller texto le code entier de ma nouvelle page qui est cette fois en php :

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>yuyu</title>
    <meta name="description" content="yuyu
    <meta name="keywords" content="yuyu">
    <meta name="language" content="français">
    <meta name="author" content="yuyu
    <meta name="reply-to" content="yuyu">
    <meta name="robots" content="all">

    <script language="JavaScript" type="text/javascript">
    <!--
    function openFullWindow(url) {
    // parameters: url = URL of the popup window
    //alert(screen.width);
    var w = screen.width; //fixed width
    var h = screen.height; //fixed height
    //var url = url_full;
    //if(w <= 800) {
    // url = url_800;
    //}
    leftPosition = 0; // centering horizontal position to middle of screen
    topPosition = 0; // centering vertical position to middle of screen
    if (h<800)
    {
    var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no'; //set popup window properties
    } else
    {
    var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no'; //set popup window properties
    }
    var popup = window.open(url,'remote',windowprops); // open popup window with properties
    popup.moveTo(0,0)
    popup.resizeTo(screen.width,screen.height);
    //popup.focus(); // focus on window
    }
    //-->
    </script>
    <script language="JavaScript">

    function openWindowcesu(width,height) {
    x = (640 - width)/2, y = (480 - height)/2;
    if (screen) {
    y = (screen.availHeight - height)/2;
    x = (screen.availWidth - width)/2;
    }
    if (screen.availWidth > 1800) {
    x = ((screen.availWidth/2) - width)/2;
    }
    window.open('carte.jpg','newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
    }
    function openWindowcarte(width,height) {
    x = (640 - width)/2, y = (480 - height)/2;
    if (screen) {
    y = (screen.availHeight - height)/2;
    x = (screen.availWidth - width)/2;
    }
    if (screen.availWidth > 1800) {
    x = ((screen.availWidth/2) - width)/2;
    }
    window.open('cesu.uuuu','newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
    }
    </script>
    </head>



    <style type="text/css">
    body {
    margin:0;
    padding:0;
    background-color:#FFFFFF;
    }
    #tableau
    {
    height:100%;
    width:100%;
    border:0;
    }
    #anim
    {
    text-align:middle;
    vertical-align:middle;
    }


    </style>
    <body>
    <table id="tableau">
    <tr>
    <th scope="col" id="anim"><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="766" height="750">
    <param name="movie" value="yuyu52.swf">
    <param name="quality" value="high">
    <embed src="yuyu52.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="766" height="750"></embed>
    </object></th>
    </tr>
    </table>
    </body>
    </html>

Discussions similaires

  1. Problème taille fenêtres setup
    Par Yami no tenshi dans le forum Windows XP
    Réponses: 1
    Dernier message: 17/07/2008, 20h41
  2. image suit taille fenêtre
    Par skip78 dans le forum GTK+ avec C & C++
    Réponses: 4
    Dernier message: 22/11/2006, 06h48
  3. Response.Redirect avec fenêtre ?
    Par delavega dans le forum ASP
    Réponses: 2
    Dernier message: 27/09/2006, 13h13
  4. Changer taille fenêtre
    Par arnaud_verlaine dans le forum Général JavaScript
    Réponses: 6
    Dernier message: 26/06/2006, 10h07
  5. Taille fenêtre ACCESS
    Par STEF_1 dans le forum IHM
    Réponses: 4
    Dernier message: 22/10/2003, 08h35

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo