Hej.
Jag har en replace funktion som ex byter ut : ) mot :). Men jag vill att tex när man skriver i formuläret : ) så ska :) den synas där oxå. så at tdet inte står : ) där uten det :) står. Såhär ser koden ut där allt presenteras:
strPress = Trim(Strang(rs4("beskrivning")))
strPress = Replace (strPress,vbCrLf,"<br>")
strPress = Replace(strPress,"[fet]","<B>")
strPress = Replace(strPress,"[/fet]","</B>")
strPress = Replace(strPress,"[u]","<u>")
strPress = Replace(strPress,"[/u]","</u>")
strPress = Replace(strPress,"[i]","<i>")
strPress = Replace(strPress,"[/i]","</i>")
strPress = Replace(strPress,"[vit]","<font color=""#ffffff"">")
strPress = Replace(strPress,"[/vit]","</font>")
strPress = Replace(strPress,"[blå]","<font color=""#0000FF"">")
strPress = Replace(strPress,"[/blå]","</font>")
strPress = Replace(strPress,"[gul]","<font color=""#FFFF00"">")
strPress = Replace(strPress,"[/gul]","</font>")
strPress = Replace(strPress,"[röd]","<font color=""#FF0000"">")
strPress = Replace(strPress,"[/röd]","</font>")
strPress = Replace(strPress,"[orange]","<font color=""#FF9933"">")
strPress = Replace(strPress,"[/orange]","</font>")
strPress = Replace(strPress,"[grön]","<font color=""#00CC00"">")
strPress = Replace(strPress,"[/grön]","</font>")
strPress = Replace(strPress,"[grå]","<font color=""#999999"">")
strPress = Replace(strPress,"[/grå]","</font>")
strPress = Replace(strPress,"[rosa]","<font color=""#FF6699"">")
strPress = Replace(strPress,"[/rosa]","</font>")
strPress = Replace(strPress,"[lila]","<font color=""#660066"">")
strPress = Replace(strPress,"[/lila]","</font>")
strPress = Replace(strPress,"[ljusblå]","<font color=""#CCCCFF"">")
strPress = Replace(strPress,"[/ljusblå]","</font>")
strPress = Replace(strPress,":)","<IMG SRC=""/jonas/db/bilder/smileys/glad.gif"">")
strPress = Replace(strPress,";)","<IMG SRC=""/jonas/db/bilder/smileys/blink.gif"">")
strPress = Replace(strPress,"8)","<IMG SRC=""/jonas/db/bilder/smileys/cool.gif"">")
strPress = Replace(strPress,"})","<IMG SRC=""/jonas/db/bilder/smileys/devil.gif"">")
strPress = Replace(strPress,":(","<IMG SRC=""/jonas/db/bilder/smileys/sur.gif"">")
strPress = Replace(strPress,":Z","<IMG SRC=""/jonas/db/bilder/smileys/trott.gif"">")
strPress = Replace(strPress,":P","<IMG SRC=""/jonas/db/bilder/smileys/tunga.gif"">")
strPress = Replace(strPress,":D","<IMG SRC=""/jonas/db/bilder/smileys/smile.gif"">")
strPress = Replace(strPress,"|(","<IMG SRC=""/jonas/db/bilder/smileys/frusty.gif"">")
strPress = Replace(strPress,":A","<IMG SRC=""/jonas/db/bilder/smileys/puh.gif"">")
strPress = Replace(strPress,":B","<IMG SRC=""/jonas/db/bilder/smileys/sadley.gif"">")
strPress = Replace(strPress,":C","<IMG SRC=""/jonas/db/bilder/smileys/sleephappy.gif"">")
strPress = Replace(strPress,":E","<IMG SRC=""/jonas/db/bilder/smileys/vork.gif"">")
strPress = Replace(strPress,":L","<IMG SRC=""/jonas/db/bilder/smileys/pukey.gif"">")
Response.Write strPress
Tacksam för svar
[Redigerat av JonasT den 13 feb 2002]