webForumDet fria alternativet

<% Visar sig inte.. (lektion)

ASP

6 svar · 233 visningar · startad av sin_adec

Medlem sedan apr. 2002272 inlägg
Frågan#1

Hej!...
jag sitter här skriver lite lektioner i ASP..

det här vill inte visa sig på sidan..

[röd]
 <% Response.write "Välkommen till min hemsida" %>
Idag är det<%= Date %>

[/röd]

använder mig av följande kod

<%
strPress = Recset("lektion")
strPress = Replace (strPress,vbCrLf,"<br>")
strPress = Replace(strPress,"[fet]","<B>")
strPress = Replace(strPress,"[/fet]","</B>")
strPress = Replace(strPress,"[b]","<Big>")
strPress = Replace(strPress,"[/b]","</Big>")
strPress = Replace(strPress, "[url]", "<a href=""")
strPress = Replace(strPress, "[/url]", "</a>")
strPress = Replace(strPress, "[mitten]", "<center>")
strPress = Replace(strPress, "[/mitten]", "</center>")

strPress = Replace(strPress,"","<u>")
strPress = Replace(strPress,"","</u>")
strPress = Replace(strPress,"","<i>")
strPress = Replace(strPress,"","</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>")

Response.Write strPress

%>

när jag sen kollar på lektionen.. alltså efter att det har sparats i databasen

blir det bara

"idag är det "

jag vill att koden ska visa sig..

Medlem sedan apr. 20021 203 inlägg
#2

Ett första tips är alldrig använda [röd] utan istället [rod] eller .... som på wF!

:)

Medlem sedan apr. 20021 203 inlägg
#3

Och koden som du skriver mellan röd och /röd, är det i en textarea som sedan tas emot av en annan sida där Replacen finns, eller?

:q

Medlem sedan apr. 2002272 inlägg
#4

japp..

Medlem sedan apr. 20021 203 inlägg
#5

Ok, men du kan inte skriva in ASP-kod på en HTML-sida som sedan skickas vidare. Då får du istället först lagra datumet i en variabel:

Variable = Date

och sedan får du med t.ex. med ett javascript göra så att när man trycker på en knapp så ploppar datumet fram (i.e. variabeln som det är sparat i.)

Om jag förstod din fråga rätt...

:)

Medlem sedan apr. 20021 203 inlägg
#6

Förresten, på din hemsida står det att du snackar Lingala. Var talas det språket?

:)

Medlem sedan juli 20011 084 inlägg
#7

tror du verkligen de är så smart att skriva lektioner...? När du fortfarande själv får problem?

ps. man kan väll inte ha asp variabler i databas?

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