Visualizzazione dei risultati da 1 a 3 su 3

Discussione: errore codice popup

  1. #1

    errore codice popup

    salve sulla home di joomla vorrei inserire il seguente codice popup
    codice:
    <script>
    newwindow=window.open("avviso.asp","newWin","scrollbars=no,status=no,resizable=no,top=250,left=420,width=420,height=445")
    newwindow.creator=self
    
    </script>

    la pagina index.php è la seguente:
    codice:
    <?php
    /**
    * @version		$Id: index.php 14401 2010-01-26 14:10:00Z louis $
    * @package		Joomla
    * @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
    * @license		GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */
    
    // Set flag that this is a parent file
    define( '_JEXEC', 1 );
    
    define('JPATH_BASE', dirname(__FILE__) );
    
    define( 'DS', DIRECTORY_SEPARATOR );
    
    require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
    require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
    
    JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
    
    /**
     * CREATE THE APPLICATION
     *
     * NOTE :
     */
    $mainframe =& JFactory::getApplication('site');
    
    /**
     * INITIALISE THE APPLICATION
     *
     * NOTE :
     */
    // set the language
    $mainframe->initialise();
    
    JPluginHelper::importPlugin('system');
    
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
    $mainframe->triggerEvent('onAfterInitialise');
    
    /**
     * ROUTE THE APPLICATION
     *
     * NOTE :
     */
    $mainframe->route();
    
    // authorization
    $Itemid = JRequest::getInt( 'Itemid');
    $mainframe->authorize($Itemid);
    
    // trigger the onAfterRoute events
    JDEBUG ? $_PROFILER->mark('afterRoute') : null;
    $mainframe->triggerEvent('onAfterRoute');
    
    /**
     * DISPATCH THE APPLICATION
     *
     * NOTE :
     */
    $option = JRequest::getCmd('option');
    $mainframe->dispatch($option);
    
    // trigger the onAfterDispatch events
    JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
    $mainframe->triggerEvent('onAfterDispatch');
    
    /**
     * RENDER  THE APPLICATION
     *
     * NOTE :
     */
    $mainframe->render();
    
    // trigger the onAfterRender events
    JDEBUG ? $_PROFILER->mark('afterRender') : null;
    $mainframe->triggerEvent('onAfterRender');
    
    /**
     * RETURN THE RESPONSE
     */
    echo JResponse::toString($mainframe->getCfg('gzip'));
    ho provato ma inserire quel codice in alto però mi da il seguente errore:
    Warning: Cannot modify header information - headers already sent by (output started at /root/index.php:1) in /root/libraries/joomla/session/session.php on line 426
    come posso inserire il popup sul sito senza moduli o plugin?

    Grazie

  2. #2
    codice:
    <script>
    newwindow=window.open("avviso.asp","newWin","scrollbars=no,status=no,resizable=no,top=250,left=420,width=420,height=445")
    newwindow.creator=self
    
    </script>
    la pagina è avviso.html e non avviso.asp


  3. #3
    Argh...
    Inserire del codice html nella index di joomla...è da pazzi furiosi!
    Devi modificarti il componente/modulo/template corretto, non puoi mettere fondamentalmente a caso della roba e sperare che funzioni come pensi...

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 © 2025 vBulletin Solutions, Inc. All rights reserved.