webForumDet fria alternativet

Response.write

ASPur ASP

10 svar · 251 visningar · startad av roj

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

Hmm jag får inga felmedelanden men samtidigt så skriver min kod ingenting? Någon som ser vad som är fel?

<%
response.write "<TABLE width='100%' border='0' cellspacing='0'>"
response.write "<TR  height='30%'>"
response.write "<TD class='td'>&nbsp;</TD>" 
response.write "</TR>" 
response.write "</TABLE>"
response.write "<TABLE width='15%' border='0' cellspacing='0'>"
response.write "<TR>"
response.write "<TD class='td1' onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;</TD>"
response.write "</TR>"
response.write "<TR>"
response.write "<TD class='td2' onMouseOver='this.style.background='#e1e1d9''  onMouseOut='this.style.background='#e1e1e1''>&nbsp;</TD>"
response.write "<TR>"
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2'onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "<TR>" 
	response.write "<TD class='td2'onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2'onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2'onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2'onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2'onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1'onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2' onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1' onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2' onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1' onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2' onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1' onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td2' onMouseOver='this.style.background='#e1e1d9'' onMouseOut='this.style.background='#e1e1e1''>&nbsp;"
	response.write "</TD>" 
response.write "</TR>" 
response.write "<TR>" 
	response.write "<TD class='td1' onMouseOver='this.style.background='#eeeee1'' onMouseOut='this.style.background='#eeeeee''>&nbsp;"
	response.write "</TD>"
response.write "</TR>" 
response.write "</TABLE>"
response.write "<b>hej</b>"
%>
Medlem sedan dec. 19996 522 inlägg
#2

Om du visar källa, hur ser koden ut då ?

Medlem sedan maj 20021 028 inlägg
#3

hmm, kan det bero på enkel-fnuttarna som är nästlade i dina styles?

ett tips är annars att strunta i response.write helt o hållet. gör så här istället:

1. skriv din asp-kod. stäng asp-tag
2. skriv ren html
3. öppna asp-tag och fortsätt med asp-kod, variabler o allt möjligt
4. repetera när du vill lägga in större kodstycken i html.

Medlem sedan apr. 2002179 inlägg
#4

Typ så här

<TABLE width='100%' border='0' cellspacing='0'><TR  height='30%'><TD class='td'>&nbsp;</TD></TR></TABLE><b>hej</b>
Medlem sedan apr. 2002179 inlägg
#5

Okej nu funkar det men inte med mitt stylesheet.. Går det inte att ha det nu då eller?

Medlem sedan apr. 20003 174 inlägg
#6

Testa denna: *phu* ;)

[RED]<%

	Response.Write ""&_
		
		"<TABLE width=""100%"" border=""0"" cellspacing=""0"">"& vbcrlf &_
		"<TR  height=""30%"">"& vbcrlf &_
		"<TD class=""td"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR>"& vbcrlf &_ 
		"</TABLE>"& vbcrlf & vbcrlf &_
		
		"<TABLE width=""15%"" border=""0"" cellspacing=""0"">"& vbcrlf &_
		"<TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td2"" onMouseOver=""this.style.backgroundColor='#e1e1d9';"" onMouseOut=""this.style.backgroundColor='#e1e1e1';"">&nbsp;</TD>"& vbcrlf &_ 
		"</TR><TR>"& vbcrlf &_
		"<TD class=""td1"" onMouseOver=""this.style.backgroundColor='#eeeee1';"" onMouseOut=""this.style.backgroundColor='#eeeeee';"">&nbsp;</TD>"& vbcrlf &_
		"</TR>"& vbcrlf &_ 
		"</TABLE>"& vbcrlf &_
		"<b>hej</b>"

%>[/RED]
Medlem sedan apr. 2002179 inlägg
#7

Tack Palle funkar ju toppen.. :)

Medlem sedan apr. 20003 174 inlägg
#8

Gutt mos!
Replace-funktionen i texteditorn kan rädda liv.. ;)

Medlem sedan apr. 2002179 inlägg
#9

Word!

Medlem sedan juli 2002549 inlägg
#10

Va fan har Word med saken att göra? :p

Medlem sedan aug. 2002207 inlägg
#11

Han kanske använde det för att söka och ersätta? ;)

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