Print Page | Close Window

A dumb question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=5931
Printed Date: 31 March 2026 at 6:31am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: A dumb question
Posted By: ziwez0
Subject: A dumb question
Date Posted: 24 September 2003 at 2:34am
Im having problems setting the size of my tables,
im using asp response.write method  to create the tables, but the width i can get to work but the height is just being a stubborn muel
have a look at the code and tell me where im goning wrong..please



<TABLE border=1 height="400" WIDTH="350"  CELLPADDING=0 CELLSPACING=0 bordercolor=red>
<td width="4"></td><td>

<%
Dim strLocation


function getLocation(olocation)
 Select Case olocation
 case "11"
 If Instr(strLocation," 11#")=0 Then
    strLocation=strLocation & " 11#"
    getLocation="Marsa Alam"
 End If
 case "33"
 If Instr(strLocation," 33#")=0 Then
    strLocation=strLocation & " 33#"
    getLocation="Sharm El Sheikh"
end if
 case "22"
 If Instr(strLocation," 22#")=0 Then
  strLocation=strLocation & " 22#"
  getLocation="Liveaboards"
  End If
 End Select
End function


Dim Conn, dbPath
dbPath = Server.MapPath("/demo/db/SpecialOffersDB.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0; DATA SOURCE=" & dbPath

Set UserRecordset = Server.CreateObject("ADODB.Recordset")
sqlstring = "select * from Special02 order by location"


UserRecordset.Open sqlstring, conn

While NOT UserRecordset.EOF
objid = UserRecordset("IDKEY")
objLocation = UserRecordSet("Location")
objDate = UserRecordSet("Date-d")
objhotel = UserRecordSet("hotel")
objdesc = UserRecordSet("desc")
objcost = UserRecordSet("cost")
objuser = UserRecordSet("user")


 
   Response.Write "<table border='1' bordercolor='black' height='100' width='300'><tr><td height='10'><u>< ;b><h3>" & getLocation (objLocation) & "</h3></u></b></td><TD> &nbsp;</TD><TD>&nbsp;</TD></tr& gt;"
   Response.Write "<tr><td height='15'><u><b><h5&g t;" & objDATE & "</h5></u></b></td><TD> &nbsp;</TD><TD>&nbsp;</TD></tr& gt;"
  Response.Write "<tr><td class='spechoteldesc'>" & objhotel & "</td><td class='spechoteldesc'>" & objdesc & "</td><td class='specCost'><b>" & objcost & "</b></td></tr></table>"
 
    UserRecordset.MoveNext
wend
UserRecordset.Close : Set UserRecordset=nothing
conn.close : Set conn=nothing
%>

</td></tr>
</table>

(if you see "& gt;" just ignore, their is a problem uploading exactley what ive typed)



-------------
If anything takes long to do its worth doing.



Replies:
Posted By: ziwez0
Date Posted: 24 September 2003 at 3:21am
its ok ive sorted it, it hates <h1></h1> <h5></h5> etc



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net