webForumDet fria alternativet

Vis......

7 svar · 530 visningar · startad av JonasT

JonasTMedlem sedan dec. 2001148 inlägg
#1

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,"&#0124;(","<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]

Jesper TMedlem sedan nov. 20017 144 inlägg
#2

Misstänker att detta blir lite svårt, något måste väl exekveras innan man kan göra en replace?!!!

Fråga någon guru!

MVH Jesper T

------------------
If ASPackad date-1 then ASPerin Now

HermanMedlem sedan maj 2001431 inlägg
#3

Går det inte bara att lägga till

strPress = Replace(strPress,": )","<IMG SRC=""/jonas/db/bilder/smileys/glad.gif"">")

??

------------------
En eller annan godbit från pannan

PaceMedlem sedan juni 20019 024 inlägg
#4

Det går väl inte att köra HTML i forumlär heller...

------------------
"Tål det inte att skämtas om, är det inte värt att ta på allvar."

JonasTMedlem sedan dec. 2001148 inlägg
#5

Asså...om ja skriver : ) så visas det :). Men jag vill att det ska synas direkt i formet när man skriver

icaaqMedlem sedan okt. 20005 273 inlägg
#6

Du kan inte få in bilder i en textarea.

mvh icaaq

------------------
-::| a tribute to LarsG |::-

Jesper TMedlem sedan nov. 20017 144 inlägg
#7

Du kan inte få in bilder i en textarea.

Jo, som bakgrunder! ;)

Men det ärkanske inte så snyggt, en textruta fylld med gubbar i en rad?!

MVH Jesper T

------------------
If ASPackad date-1 then ASPerin Now

hopparnMedlem sedan nov. 20011 551 inlägg
#8

hehe, kanske kan sätta fixed och centrera den som bakgrund ;)

------------------
Rammstein - Sehnsucht

131 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
128 ms — hämta tråd, inlägg och bilagor (db)