Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Problemi con popup in javascript

    Ciao, ho un problemino con js. Ho una pagina html (index.html) con un filmato flash (intro.swf) con un pulsante che mi apre un'altra pagina (full.html) in pop-up. Nel pulsante c'è il seguente codice:

    on (release) {
    getURL ("javascript:fullScreen('full.html')");
    }




    e nella pagina html ho il seguente codice:


    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>index.html</title>
    <script src="swfobject.js" language="javascript"></script>
    <style type="text/css">
    html,body{
    padding-left: 120px;
    margin: 0;
    }
    </style>
    </head>
    <script language="JavaScript">
    function fullScreen(theURL) {
    window.open(theURL, '', 'fullscreen=yes, scrollbars=yes');
    }
    </script>
    <body bgcolor="#000000">
    <div id="flashcontent">
    Link
    </div>
    <script type="text/javascript">
    // <![CDATA[

    var so = new SWFObject("intro.swf", "sotester", "300", "500", "9", "#000");
    so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
    so.write("flashcontent");

    // ]]>
    </script>
    </body>
    </html>

    purtroppo lo script non funziona. Dove sbaglio? grazie

  2. #2
    io ho risolto utilizzando dentro l'html questo codice:

    <script language="JavaScript" type="text/javascript">
    <!--
    var newwin = null;
    function fullScreen() {
    newwin = window.open('full.html','','scrollbars=no,resizabl e=yes,width=600,height=335');
    if(parseInt(navigator.appVersion) >= 4) {
    setTimeout('newwin.focus();',250);
    }
    }
    //-->
    </SCRIPT>

    l'azione del pulsante dentro Flash è:

    on (release) {
    getURL("javascript:fullScreen()");
    }

    prova.
    L'errore te lo da perchè Flash lo hai racchiuso dentro l'oggetto SWFObject per evitare la fastidiosa cornice che genera Explorer

  3. #3
    Sostituendo il javascript con quello da te suggeritomi e mantenendo swfobject il problema persiste. Forse sbaglio qualcosa


    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>INDEX</title>
    <script src="swfobject.js" language="javascript"></script>
    <style type="text/css">
    html,body{
    padding-left: 120px;
    margin: 0;
    }
    </style>
    <script language="JavaScript" type="text/javascript">
    <!--
    var newwin = null;
    function fullScreen() {
    newwin = window.open('full.html','','scrollbars=no,resizabl e=yes,width=600,height=335');
    if(parseInt(navigator.appVersion) >= 4) {
    setTimeout('newwin.focus();',250);
    }
    }
    //-->
    </SCRIPT>
    </head>

    <body bgcolor="#000000">
    <div id="flashcontent">
    Link
    </div>
    <script type="text/javascript">
    // <![CDATA[

    var so = new SWFObject("intro.swf", "sotester", "350", "500", "9", "#000");
    so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
    so.write("flashcontent");

    // ]]>
    </script>
    </body>
    </html>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.