Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HTML Tables in ASP
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HTML Tables in ASP

 Post Reply Post Reply Page  12>
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: HTML Tables in ASP
    Posted: 23 August 2003 at 11:47am
Flamewave helped me to solve my problem with displaying pictues from a database earlier this month. You can find the post at http://forums.webwiz.net/forum_posts.asp?TID=4763&PN=5.

However, I need help with something else now. Please take a look at http://www.hotelfloors.com/specials2.asp. I am unhappy with the way the tables are being displayed. I wanted the pictures of the specials to show up right beside the buttons. I cannot seem to get the tables to display the way I want them to. I was able to display three tables on the same line on one of my ASP pages. For some reason, I cannot show two tables on the same line on this page. Dreamweaver won't even let me move the table to my desired location on the page.

Please look at the html source of the page. I put the following code:   <td width="4"></td>
          <td bgcolor=white width="10">
between the two tables. But it didn't work.

Please let me know how I can fix this problem.

 



Edited by Misty
Back to Top
Bliss View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2003
Location: United States
Status: Offline
Points: 181
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bliss Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2003 at 5:17pm
Use colspan and rowspan instead of lots of empty tables. Tables that are empty do not follow the width attribute so you have to put &nbsp; in them.
Hehehe...
Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2003 at 5:54pm

A hint for you: Resize the images in a imaging program, NOT the HTML! As it is, the images take ages to load, but if you resized them in an imaging program, the file size would be significantly less and load a helluva lot quicker.

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2003 at 7:18pm

I tried to make some changes. But it is still not working. Take another look at http://www.hotelfloors.com/specials2.asp. I cannot resize the images. The images are displayed from a database. Here's the code for my images: <td><a href="ViewSpecial.asp?qryID=<%=rs("SpecialsID")%>"><img src=../images/<%= rs("ImageName") %> width="144" height="144" border="0" alt=<%= rs("SpecialsName")%>></a></td>

I have to loop through the records to display all pictures. I wonder if I am having problems due to a lot of ASP Code.

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 12:10am

I don't see any reason in that piece of code why you cannot resize the images; they are not displayed from a database, the name of the image is stored in the database and the image is displayed from that. Personally, I would put a 144 x 144 copy of each image in a 'thumbnail' folder, then change the path from 'images' to 'thumbnail' in the code you gave. That way, you have a smaller, quicker loading image, and, if you need it, you have the full-size version. Believe me, people are far more likely to leave your site if the images take forever to load.

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 1:52am

Misty,

Just to clear something up... If you change the image dimensions in your <img .. width="x" y="x">, you're not actually changing the physical filesize of the image.

All you are doing is 'squeezing' the existing image into the dimensions you specify... therefore it will not be any quicker to load.

As Blair suggested you should resize and resample your images using an imaging program.

Cheers,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
vshriniwasan View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2001
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote vshriniwasan Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 12:50pm
Can you show the whole source for the page. Copy and past it. That way we can see it clearly...
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 1:49pm

Please take a look at http://www.signaturecarpets.com/runninglines.php?type=Cut+Pile. This is how I would like for the pictures to be displayed on my web page at http://www.hotelfloors.com/specials2.asp. My images are stored in a separate folder called "images". I would like to keep my images at width=144 and height=144.

I'll show some code below. I am not going to include everything.

1st table on the web page:

<table width="680" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="13" height="13">&nbsp;</td>
    <td width="504">&nbsp;</td>
    <td width="163">&nbsp;</td>
  </tr>
  <tr>
     <td height="108"></td>
 
    <td valign="top"><img src="NSLogo.gif" width="447" height="108"></td>
    <td></td>
  </tr>
  <tr>
    <td height="4"></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

Second table on the web page (this table contains the buttons):
 
 
<table width="154" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="8" height="73"></td>
    <td width="125"></td>
    <td width="19"></td>
    <td width="2"></td>
  </tr>
  <tr>
    <td height="38">&nbsp;</td>
    <td valign="top"><a href="AboutUs.htm"><img src="AboutUs.gif" width="83" height="16" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="38">&nbsp;</td>
    <td valign="top"><a href="Installations.htm"><img src="Installations.gif" width="104" height="16" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="38">&nbsp;</td>
    <td valign="top"><a href="Specials.asp"><img src="Specials.gif" width="73" height="19" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="38">&nbsp;</td>
    <td valign="top"><a href="BrowseProducts.asp"><img src="Products.gif" width="77" height="16" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="38">&nbsp;</td>
    <td valign="top"><a href="ContactUs.htm"><img src="ContactUs.gif" width="97" height="16" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="38">&nbsp;</td>
    <td valign="top"><a href="index.asp"><img src="Home.gif" width="52" height="16" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

Third Table (this is where I am having the problem):

         <td width="4"></td>
          <td bgcolor=white width="10">
<table border="0" cellspacing="0" cellpadding="0" width="85%">
<tr>
    <td height="45" valign="top"><div align="center"><font color="#000000" size="5" face="Arial, Helvetica, sans-serif"><strong>Specials</strong></font></div></td>
  </tr>

<%
Do While Not rs.EOF
  NumRecords = NumRecords + 1
  rs.MoveNext
  
Loop
rs.MoveFirst
Do While NOT rs.EOF %>
  <tr>
<% 
For i=1 to NUM_COLUMNS
  If rs.EOF Then
   EndOfRS = 1
   Exit For
  End If

    %><td><a href="ViewSpecial.asp?qryID=<%=rs("SpecialsID")%>"><img src=../images/<%= rs("ImageName") %> width="144" height="144" border="0" alt=<%= rs("SpecialsName")%>></a></td>

<% If rs.EOF Then
   EndOfRS = 1
   Exit For
 End If
 rs.MoveNext
  Next
  If EndOfRS = 0 Then
    rs.Move -NUM_COLUMNS
 If rs.BOF = True Then
   rs.MoveFirst
 End If
  End If
  If EndOfRS = 1 Then
    rs.MoveFirst
    Temp1 = InStr((NumRecords / NUM_COLUMNS), ".")
 Temp2 = Left((NumRecords / NUM_COLUMNS), Temp1-1)
 Temp3 = Temp2 * NUM_COLUMNS
    rs.Move Temp3
  End If
%>
  </tr>
  <tr>
<%
   For i=1 to NUM_COLUMNS
  If rs.EOF Then Exit For

 %><td><b><%= rs("SpecialsName") %></b><p><p><p></td>
 <%rs.MoveNext
 If rs.EOF Then Exit For
  Next
%>
  </tr>
<% Loop %>
</center></table>

I see no need to include the last table which has the links at the bottom of the web page. I don't believe that the code for the last table affects the way my pictures are being displayed.

 

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.