Visualizzazione dei risultati da 1 a 5 su 5

Discussione: Formattazione textarea

  1. #1
    Utente di HTML.it
    Registrato dal
    Apr 2002
    Messaggi
    364

    Formattazione textarea

    Salve
    ho il seguente problema, vorrei inserire in una textarea un testo scritto come di seguito riportato(il testo delimitato dagli asterischi)

    Lo richiamo e lo passo dentro una funzione che mi sostituisce gli accapi e gli spazi ma la formattazione viene sballata uguale.
    Esiste un modo per farlo
    Grazie anticipatamente



    ************************************************** ***
    Alt/larg

    erterterttt 987/789
    ertert 654/789
    ertererter 987/987
    ert 658/987
    er 654
    tertert
    ertertert
    ertertert
    ************************************************** ****


    questa e la funzione di cui sopra
    FUNCTION toHTML_CRLF(str)
    strTmp = str
    if len(strTmp) > 0 then
    stringaFormat = replace(strTmp, " ", "")
    stringaFormat = replace(stringaFormat, CHR(10), "
    ")
    toHTML_CRLF = stringaFormat
    end if
    END FUNCTION

  2. #2
    Utente di HTML.it
    Registrato dal
    Apr 2002
    Messaggi
    364
    nel post il testo si vede in maniera sbagliata da come l'avevo formattato io io in text area ovvero due colonne una con la descrizione e una con le misure il tutto formattato tramite spazi

    VVoVe:

  3. #3
    prova a sostituire
    codice:
    chr(10)
    con
    codice:
    VbCrLf
    Purtroppo bisogna imparare che il computer non sbaglia...fa solo quello che gli dici di fare

    www.netpolaris.it

  4. #4
    Utente di HTML.it
    Registrato dal
    Apr 2002
    Messaggi
    364
    Il mio problema pultroppo non è andare a capo sonoi gli spazi che non me li mantiene correttamente


    FUNCTION toHTML_CRLF(str)
    strTmp = str
    if len(strTmp) > 0 then
    stringaFormat = replace(strTmp, " ", "")
    stringaFormat = replace(stringaFormat, CHR(10), "
    ")
    toHTML_CRLF = stringaFormat
    end if
    END FUNCTION




  5. #5
    Prova sostituendo gli spazi, con la stringa "spazio" in HTML.
    codice:
    FUNCTION toHTML_CRLF(str)
    strTmp = str
    if len(strTmp) > 0 then
    stringaFormat = replace(strTmp, " ", "")
    stringaFormat = replace(stringaFormat, CHR(10), "
    ")
    toHTML_CRLF = stringaFormat
    end if
    END FUNCTION
    Non si vede nella funzione perchè ovviamente il forum lo traduce in uno spazio.
    Per copiare la tua funzione, quota il mio post e la trovi scritta correttamente.
    La stringa da inserire è &.nbsp; senza il . fra & e nbsp; ... spero d'esser stato chiaro e d'aiuto.
    5te.

    http://www.TuningLove.com
    Right to the heart of Tuning

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.