Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    2,929

    problema con txt esterno

    ciao a tutti

    qualcuno sa spiegarmi perchè non funziona l'opzione "rendi testo come HTML"
    codice:
    function txtesterno() {
        car = new LoadVars();
        car.load("il gruppo.txt");
        car.onLoad = function(success) {
            if ((success)) {
                testo = new String();
                testo = car.testo;
                testoesterno.text = testo;
                testoesterno.text.htmlText;
            } else {
                testoesterno.text = "ERRORE - non è stato possibile caricare il file di testo";
            }
        };
    }
    txtesterno();
    testoesterno.text.htmlText;
    system.useCodepage = true;
    stop();
    questo per caricarlo mentre nel txt

    [code]
    &testo=qua
    [code]

    :master:

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    codice:
    testoesterno.html = true;
    testoesterno.htmlText = testo;

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    2,929
    perfetto!!! :metallica

    scusa non ricordo come si poteva evitare la cache, e dove andrebbe inserito..


  4. #4
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    codice:
    car.load("il gruppo.txt?q=" + getTimer());
    ma non usare gli spazi, nei nomi, meglio che il file si chiami:

    codice:
    car.load("il_gruppo.txt?q=" + getTimer());

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    2,929
    mi va su errore (quindi dopo else)

    codice:
    function txtesterno() {
        car = new LoadVars();
        car.load("gruppo.txt?q="+getTimer());
        car.onLoad = function(success) {
            if ((success)) {
                testo = new String();
                testo = car.testo;
                testoesterno.html = true;
                testoesterno.htmlText = testo;
            } else {
                testoesterno.text = "ERRORE - non è stato possibile caricare il file di testo";
            }
        };
    }
    txtesterno();
    system.useCodepage = true;
    stop();
    il file l'ho rinominato "gruppo"


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.