webForumDet fria alternativet

ändå inget BR :(

ASP

5 svar · 182 visningar · startad av MoonCow

Medlem sedan juni 2001223 inlägg
Frågan#1

Tjena! :) Jag hade tänkt att ens presentation på min community skulle ha stöd för radbrytningar men ändå inte HTML.. gjorde så här:

<%
textish = Server.HTMLEncode(RecSet("presentation"))
textish = Replace(textish, ":)", "<img src='smiley.gif'>")
textish = Replace(textish, ":-)", "<img src='smiley.gif'>")
textish = Replace(textish, "=)", "<img src='smiley.gif'>")
textish = Replace(textish, ";)", "<img src='skamta.gif'>")
textish = Replace(textish, ";-)", "<img src='skamta.gif'>")
textish = Replace(textish, ":D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":-D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":(", "<img src='sad.gif'>")
textish = Replace(textish, ":-(", "<img src='sad.gif'>")
textish = Replace(textish, ":p", "<img src='tongue.gif'>")
textish = Replace(textish, ":-p", "<img src='tongue.gif'>")
textish = Replace(textish, "vbcrlf", "<br>")
textish = Replace(textish, "VBCR", "<br>") 

%>
<%=textish%>

men ändå inga radbrytningar (smilisarna fungerar dock)
är inte så haj på VBCR och vad det heter.. möjligt att dom är fel men nån som vet?

------------------
all your base are belong to us

Medlem sedan mars 20007 896 inlägg
#2

Det ska inte vara några dubbelfnuttar runt vbCrLf.

textish = Replace(textish, vbcrlf, "<br>")
textish = Replace(textish, VBCR, "<br>")

------------------
SPiN, bjorne.w@telia.com

-- Tekniska framsteg är som en yxa i händerna på en kriminell galning / Albert Einstein --

Medlem sedan dec. 19998 577 inlägg
#3

vbcrlf är en konstant och skall inte ha snuffar runt sig:

textish = Replace(textish, vbcrlf, "<br>")

vbcr behöver du inte ha med...

------------------
Doesn't 'expecting the unexpected' make the unexpected expected?
webeye.nu

Medlem sedan okt. 20005 273 inlägg
#4

<%
textish = Replace(Server.HTMLEncode(RecSet("presentation"), vbcrlf, "<br>" & vbcrlf)
textish = Replace(textish, ":)", "<img src='smiley.gif'>")
textish = Replace(textish, ":-)", "<img src='smiley.gif'>")
textish = Replace(textish, "=)", "<img src='smiley.gif'>")
textish = Replace(textish, ";)", "<img src='skamta.gif'>")
textish = Replace(textish, ";-)", "<img src='skamta.gif'>")
textish = Replace(textish, ":D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":-D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":(", "<img src='sad.gif'>")
textish = Replace(textish, ":-(", "<img src='sad.gif'>")
textish = Replace(textish, ":p", "<img src='tongue.gif'>")
textish = Replace(textish, ":-p", "<img src='tongue.gif'>")
%>
<%=textish%>

------------------
Icaaq, mannen med korven. som hejar på Bajen(!)

Medlem sedan juni 2001223 inlägg
#5

U guys :r I lub u! tack! :)

------------------
all your base are belong to us

Medlem sedan mars 20014 214 inlägg
#6

Såg bara att Vide har haft lite otur.
på dom 2 sista replace trådarna har han tre gånger lyckats svara 2a i samma minut som föregående, och samma sak :e

------------------
Den som inte vet att tiga vet inte att tala

265 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
124 ms — deklarationer (db)
0 ms — hämta statistik (cache)
139 ms — hämta tråd, inlägg och bilagor (db)
120 ms — ändringar (db)