Partage
  • Partager sur Facebook
  • Partager sur Twitter

variable GET et affichage en grand dans le navigateur (comme avec F11)

noob powered

Sujet résolu
    12 décembre 2005 à 11:37:17

    bonjour,

    c'est bon, si vous avez un jour :
    Error: str.match is not a function
    Source File: file:///E:/root/Mes%20documents/Nouveau2.html
    Line: 8

    parce que vous faisiez un str.match sur une variable avec window.location, faites comme dans cette fonction qui réouvre la page dans une fenêtre grande si la variable 'grand' est détéctée dans l'url
    <script type='text/Javascript'>
    function agrandir()
    {
      str = new String(window.location.href);
      if (str.match("?grand&quot;) && window.name!='grande')
      {
         window.open(window.top.location.href,'grande','width='+(parseInt(screen.width)-10)+',height='+screen.height+',top=0,left=0,toolbar=no') ;
         window.opener=self;
         self.close() ;
        }
    }
    </script>
    </head>
    <body onload="agrandir()">hello !!! </body>
    • Partager sur Facebook
    • Partager sur Twitter

    variable GET et affichage en grand dans le navigateur (comme avec F11)

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown