Visualizzazione dei risultati da 1 a 7 su 7

Discussione: problemi popup

  1. #1

    problemi popup

    ciao,ho un problema con questo script, non riesco a capire come funziona la parte in neretto che a me interessa,in quanto non c'è nessun richiamo allo script. riuscite a capire come funziona?
    grazie


    <script type="text/javascript" src="lib.js"></script>
    <script type="text/javascript" src="popup.js"></script>
    <script type="text/javascript" >

    // redefining default features
    var _POPUP_FEATURES = 'location=0,statusbar=0,menubar=0,width=190,height =140';

    listen('load', window, function() {
    listen('click', 'popup-listen', event_popup );
    listen('click', 'popup-feat' , event_popup_features('location=0,statusbar=1,menub ar=1,width=190,height=300') );
    mlisten('click', getElementsByClass('popup','a'), event_popup );
    });

    </script>
    </head>

    <body>

    <ul>
    [*]
    <a
    href="javascript:raw_popup('example_popup.html'); void(0)">
    the wrong method.

    test its accessibility downfalls</a>

    [*]
    <a
    href="example_popup_nojs.html"
    onclick="raw_popup('example_popup.html'); return false"
    >
    <code>raw_popup</code> using a different page for javascript disabled users

    </a>

    [*]
    <a
    href="example_popup.html"
    onclick="link_popup(this); return false"
    >
    <code>link_popup</code>

    </a>

    [*]
    <a
    id="popup-listen"
    href="example_popup.html" >
    <code>event_popup</code>: using event listeners
    </a>

    [*]
    <a
    id="popup-feat"
    href="example_popup.html" >
    <code>event_popup_features</code>: specifying window features with event listeners
    </a>

    [*]
    <a
    href="example_popup.html?099" class="popup" target="a_popup_window">
    named target windows
    </a>

    [*]
    <a href="example_popup.html?009" class="popup" target="a_popup_window">
    named target windows (same target)
    </a>

    [*]
    <a
    href="example_popup.html?909" class="popup" target="a_popup_window">
    named target windows (same target)
    </a>

    [*]
    <a
    href="example_popup.html?990" class="popup" target="another_popup_window">
    named target windows (different target)
    </a>
    [/list]
    http://www.alikweb.altervista.org

  2. #2
    http://www.alikweb.altervista.org

  3. #3
    nessuno che mi aiuta
    http://www.alikweb.altervista.org

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Nel tuo script si fa riferimento ad altri due file JS che non sono allegati.

    Nota che gli eventi si possono settare anche da JS, con una sintassi del tipo:

    OGGETTO.onclick = nomefunzione; // nota: senza le parentesi
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  5. #5
    gli altri file si possono scaricare dal link che ho dato
    http://www.alikweb.altervista.org

  6. #6
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    beh, li' e' il codice, negli script esterni (primi 2 <script>)

    poi setti un event listener che al caricamento del documento,
    (equivale al <body onload="funzione()"> o al window.onload=funzione)
    setta gli event listener opportuni per i link al click

    cosa ti sfugge?

  7. #7
    tutto risolto grazie
    http://www.alikweb.altervista.org

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.