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

    Problema!?! scrittura in popup + refresh = aggiunge testo!

    spiego meglio:
    ho una finestra madre da cui, ad ogni caricamento, apro una popup che contiene dei dati scritti dalla finestra madre con document.write().

    il problema è che ad ogni caricamento dovrei azzerare il testo della popup e sostituirlo col nuovo, non aggiungerlo.

  2. #2
    prima di fare il document.write sul popup
    devi fare document.open("text/html") oppure

    document.clear() /* deprecato */


    ciao!
    DYNAMIC+ [ E-mail ]

    Secondo me non si può fare!

  3. #3
    ciao, specifico che su IE funzionava anche senza, ma su Mozilla continua a non funzionare!

  4. #4
    Originariamente inviato da mdsjack
    ciao, specifico che su IE funzionava anche senza, ma su Mozilla continua a non funzionare!
    puoi postare il codice....?
    DYNAMIC+ [ E-mail ]

    Secondo me non si può fare!

  5. #5
    codice:
    <script type=\"text/javascript\">
    html = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">'
    + '\\r\\n' + '<html>'
    + '\\r\\n' + '<head>'
    + '\\r\\n' + '</head>'
    + '\\r\\n' + '<body> QUI CI SCRIVO DELLA ROBA DA PHP...'
    + '\\r\\n' + '</body>'
    + '\\r\\n' + '</html>'
    pop = window.open('','pop','width=340px,height=350px,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,menubar=no,copyhistory=no');
    pop.focus();
    pop.document.open('text/html');
    pop.document.write(html);
    </script>

  6. #6
    codice:
    <script type="text/javascript">
    
    html = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">'
    + '\\r\\n' + '<html>'
    + '\\r\\n' + '<head>'
    + '\\r\\n' + '</head>'
    + '\\r\\n' + '<body> QUI CI SCRIVO DELLA ROBA DA PHP...'
    + '\\r\\n' + '</body>'
    + '\\r\\n' + '</html>'
    
    pop = window.open('','pop','width=340px,height=350px,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,menubar=no,copyhistory=no'); /* tutto su una linea */
    
    pop.focus();
    
    pop.document.open('text/html');
    pop.document.write(html);
    pop.document.close();
    </script>
    a me funziona sia su IE che con MOZILLA FIREFOX e OPERA
    DYNAMIC+ [ E-mail ]

    Secondo me non si può fare!

  7. #7
    bah... a me no!

  8. #8
    Originariamente inviato da mdsjack
    bah... a me no!
    prova a mettere anche il document.clear() prima write... :-|



    ma TU lo hai MESSO document.close() vero?!?!
    xke nel tuo post delle "14-01-2005 18:08" non c'è...
    non vorrei fosse quello!
    DYNAMIC+ [ E-mail ]

    Secondo me non si può fare!

  9. #9
    ah. :|

    adesso provo...

    ----

    si era quello

    grazie mille!

  10. #10
    Originariamente inviato da mdsjack
    ah. :|

    adesso provo...

    ----

    si era quello

    grazie mille!
    benissimo
    se hai messo DOCUMENT.CLEAR() levalo
    ciao ciao!
    DYNAMIC+ [ E-mail ]

    Secondo me non si può fare!

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.