09. december 2003 - 08:37
Der er
2 kommentarer og 1 løsning
Hvorfor er div utrolig lang
I min kode har jeg indsat en div hvordan at indhold skal hentes fra en DB, men div er meget lang , ligegyldig indholdet, hvorfor?? <% Response.Buffer = True QueryMode = Request.Querystring("Mode") Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; " DSN = DSN & "DBQ=" & Server.MapPath("DB/DB.mdb") Conn.Open DSN %> <html> <head> <title> Test Side </title> <style> <!-- .TextTestXL { font-family :"R Frutiger Roman", Frutiger, Verdana, charcoal, "ms sans serif", geneva, arial, helvetica; font-size : 18pt; line-height : 18pt; text-decoration : none; } .TextTest { font-family :"R Frutiger Roman", Frutiger, Verdana, charcoal, "ms sans serif", geneva, arial, helvetica; font-size : 8pt; line-height : 11pt; text-decoration : none; } .TextFarve { font-family :"R Frutiger Roman", Frutiger, Verdana, charcoal, "ms sans serif"; font-size : 8pt; line-height : 11pt; text-decoration : none; color: #FFFFFF;} A:link {text-decoration: none; color: White;} A:visited {text-decoration: none; color: White;} A:active {text-decoration: none; color: White;} A:hover {text-decoration: underline; color: White;} --> </style> <script language="JavaScript"> <!-- Gem koden for gamle browsere function PopWin(url,h,w) { popupWin = window.open(url, 'TITKE', 'height=' + h + ',width=' + w + ',top=50,left=25') } // --> </script> </head> <body topmargin="0" leftmargin="0"> <table width="100%" height="100%" border="0"> <tr> <td valign="middle" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" align="center"> <table cellspacing="0" cellpadding="0"> <tr> <td><img src="gfx/VenTop.gif"></td> <td><img src="gfx/MidtTop.gif"></td> <td><img src="gfx/HojTop.gif"></td> </tr> <tr> <td><img src="gfx/VenMidt.gif"></td> <td> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td height="373" valign="top"> <table width="100%" height="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top" class="textTest"><div style="overflow:auto; width:758px; height:373px"> <% strSQL = "Select * from SiteGroups" Set rs = Conn.Execute(strSQL) If Not QueryMode = "" then strSQLSite = "Select * from SiteText Where SiteName = '" & QueryMode & "'" Set rsSite = Conn.Execute(strSQLSite) count = 0 if RS.eof then %> <%end if Do While Not RS.EOF count = count + 1 Response.Write "<table width='100%' height='100%' style='" & rsSite("SiteStyle") & "'><tr><td width='100%' height='100%' valign='top'>" Response.Write rsSite("SiteText") Response.Write "</td></tr></table>" RS.MoveNext Loop rs.Close set rs = Nothing else strSQLSite = "Select * from SiteText" Set rsSite = Conn.Execute(strSQLSite) Response.Write "<table width='100%' cellpadding='5' border='0'><tr><td valign='top'><img src='gfx/logo1.gif'></td><td align='left' width='230' height='157'><table cellpadding='0' cellspacing='0' class='TextTest'><tr><td width='242' height='11'><img src='gfx/news/top.gif'></td></tr><tr><td background='gfx/news/midt.gif'><table cellpadding='2' class='TextTest'><tr><td>" strSQL = "Select TOP 2 * from SiteNews ORDER BY PostDate ASC" Set rs = Conn.Execute(strSQL) count = 0 if RS.eof then %> <%end if Do While Not RS.EOF count = count + 1 TempNews = Mid(RS("News"),1,110) Response.Write "<b>" & rs("PostDate") & ": </b>" & TempNews & ".... <A HREF=java script:PopWin('NEWS.asp?IDNews=" & rs("ID") & "',300,600); " %> style="color: black;">Læs mere</a><br><br><% RS.MoveNext Loop Response.Write "</td></tr></table></td></tr><tr><td background='gfx/news/under.gif' height='26' width='242'></td></tr></table>" Response.Write "<table cellpadding='0' cellspacing='0' class='TextTest'><tr><td width='242' height='11'><img src='gfx/news/top.gif'></td></tr><tr><td background='gfx/news/midt.gif'><table cellpadding='2' class='TextTest'><tr><td>" Response.Write "Adresse" Response.Write "</td></tr></table></td></tr><tr><td background='gfx/news/under.gif' height='26' width='242'></td></tr></table>" Response.Write "</td></tr></table>" end if %> </div> </td> </tr> </table> </td> </tr> <tr> <td background="gfx/MenuBar.gif" width="758" height="25" align="center" valign="middle" class="TextFarve"> <% strSQL = "Select * from SiteGroups ORDER BY XOrder ASC" Set rs = Conn.Execute(strSQL) count = 0 if RS.eof then %> <%end if Do While Not RS.EOF count = count + 1 %> <a href="?Mode=<% = RS("ID") %>"><% = RS("Navn") %></a> <% RS.MoveNext Loop rs.Close set rs = Nothing %> </td> </tr> <tr> <td height="20" align="right"><A HREF="java script:PopWin('Kontakt.asp',150,200);" onMouseOver="window.status='Adresser & Telefon'; return true" onMouseOut="window.status=''"><img src="gfx/email.gif" border="0"></a> <A HREF="default.asp" onMouseOver="window.status='Adresser & Telefon'; return true" onMouseOut="window.status=''"><img src="gfx/home.gif" border="0"></a> </td> </tr> </table> </td> <td><img src="gfx/HojMidt.gif"></td> </tr> <tr> <td><img src="gfx/VenBund.gif"></td> <td><img src="gfx/MidtBund.gif"></td> <td><img src="gfx/HojBund.gif"></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
Annonceindlæg fra Kingston Technology
Slettet bruger
09. december 2003 - 10:05
#1
Prøv at give et eksempel fra "Vis kilde" i en browser i stedet. Eller en URL. Vi kan jo ikke lige afprøve koden, for at se, hvad der er galt. Hvor lang er din <div>? Hvis den er ca. 373 pixels, er det jo bare, hvad den har fået besked på.
09. december 2003 - 10:18
#2
Her er output'et fra "Vis kilde": <html> <head> <title> Dansk Arbejdsmiljø A/S </title> <style> <!-- .TextTestXL { font-family :"R Frutiger Roman", Frutiger, Verdana, charcoal, "ms sans serif", geneva, arial, helvetica; font-size : 18pt; line-height : 18pt; text-decoration : none; } .TextTest { font-family :"R Frutiger Roman", Frutiger, Verdana, charcoal, "ms sans serif", geneva, arial, helvetica; font-size : 8pt; line-height : 11pt; text-decoration : none; } .TextFarve { font-family :"R Frutiger Roman", Frutiger, Verdana, charcoal, "ms sans serif"; font-size : 8pt; line-height : 11pt; text-decoration : none; color: #FFFFFF;} A:link {text-decoration: none; color: White;} A:visited {text-decoration: none; color: White;} A:active {text-decoration: none; color: White;} A:hover {text-decoration: underline; color: White;} --> </style> <script language="JavaScript"> <!-- Gem koden for gamle browsere function PopWin(url,h,w) { popupWin = window.open(url, 'TITKE', 'height=' + h + ',width=' + w + ',top=50,left=25') } // --> </script> </head> <body topmargin="0" leftmargin="0"> <table width="100%" height="100%" border="0"> <tr> <td valign="middle" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" align="center"> <table cellspacing="0" cellpadding="0"> <tr> <td><img src="gfx/VenTop.gif"></td> <td><img src="gfx/MidtTop.gif"></td> <td><img src="gfx/HojTop.gif"></td> </tr> <tr> <td><img src="gfx/VenMidt.gif"></td> <td> <table cellspacing="0" cellpadding="0"> <tr> <td height="373" valign="top"> <table width="100%" height="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top" class="textTest"> <DIV style="overflow:auto; width:758px; height:373px"> <table width='100%' height='100%' style='background-color: #ffffff; color: #000000; font-family: Verdana; font-size: 12px;'><tr><td width='100%' height='100%' valign='top'><FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf<br> <FONT face="Times New Roman" size=3>fasdasdfmk amsdflka smlasm salkmf laksmfdlas mfl amsfdkl asd</FONT><br> <FONT face="Times New Roman" size=3>fas dfaskfas f</FONT><br> <FONT face="Times New Roman" size=3>asf</FONT><br> <FONT face="Times New Roman" size=3>asfmdas fkasfmas</FONT><br> <FONT face="Times New Roman" size=3>fdmas</FONT><br> <FONT face="Times New Roman" size=3>fmda</FONT><br> <FONT face="Times New Roman" size=3>sfdkmaskfaskfmas</FONT><br> <FONT face="Times New Roman" size=3>fmas</FONT><br> <FONT face="Times New Roman" size=3>fma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>sfma</FONT><br> <FONT face="Times New Roman" size=3>smfa</FONT><br> <FONT face="Times New Roman" size=3>psfmas</FONT><br> <FONT face="Times New Roman" size=3>fmaskfmaskdfmaskfasmfmasfkams kfasm fkasmf aksm fask fmaskdf maskf masd</FONT><br> <FONT face="Times New Roman" size=3>fmsfdkas mf kasmd fkasm faksmf aksf</FONT><br></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></td></tr></table><table width='100%' height='100%' style=''><tr><td width='100%' height='100%' valign='top'></td></tr></table><table width='100%' height='100%' style=''><tr><td width='100%' height='100%' valign='top'></td></tr></table><table width='100%' height='100%' style=''><tr><td width='100%' height='100%' valign='top'></td></tr></table><table width='100%' height='100%' style=''><tr><td width='100%' height='100%' valign='top'></td></tr></table> </div> </td> </tr> </table> </td> </tr> <tr> <td background="gfx/MenuBar.gif" width="758" height="25" align="center" valign="middle" class="TextFarve"> <a href="?Mode=34">Mål og Mission</a> <a href="?Mode=55">FDSD</a> <a href="?Mode=54">Medarbejder</a> <a href="?Mode=48">Metoder</a> <a href="?Mode=25">Muligheder</a> </td> </tr> <tr> <td height="20" align="right"><A HREF="java script:PopWin('Kontakt.asp',150,200);" onMouseOver="window.status='Adresser & Telefon'; return true" onMouseOut="window.status=''"><img src="gfx/email.gif" border="0"></a> <A HREF="default.asp" onMouseOver="window.status='Adresser & Telefon'; return true" onMouseOut="window.status=''"><img src="gfx/home.gif" border="0"></a> </td> </tr> </table> </td> <td><img src="gfx/HojMidt.gif"></td> </tr> <tr> <td><img src="gfx/VenBund.gif"></td> <td><img src="gfx/MidtBund.gif"></td> <td><img src="gfx/HojBund.gif"></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
09. december 2003 - 10:25
#3
Jeg fandt selv ud af det... Det var tablen som kørte i loop
Vi tilbyder markedets bedste kurser inden for webudvikling