Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem With Displaying Information
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem With Displaying Information

 Post Reply Post Reply
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: Problem With Displaying Information
    Posted: 20 July 2005 at 1:43am
I am having a problem with displaying information. I believe that it's a problem with the table. Please look at http://www.themacedoniachurch.org/staff2.asp. Look at how the buttons and header are displayed every time a record is displayed. I believe that there's a typo somewhere in my code. Can someone please help me? I'd like for it to look something like http://www.madisonheightsbaptist.org/staff.asp.
 
Here's my code:
 
'Start sql string
      sqlString = "select * from MMBCStaff Order by StaffID"
                &nbs p; 
      'Create the recordset
      set rs = Server.CreateObject("ADODB.Recordset")
      rs.Open sqlString, connectionString, adOpenDynamic, adLockOptimistic
    
      'Set the current record pointer to the first record of the recordset
      rs.MoveFirst
     
      'Loop through all the records in the recordset
      while not rs.EOF
          
      'Get values for local variables
     
      StaffName = rs("Name") & ""
      Position = rs("Title") & ""
      Email = rs("Email") & ""
      Bio = rs("Bio") & ""
 
%>
<html>
<head>
<title>About Us</title>
<!--#include file="Include_Buttons.asp"--></td>
    <td rowspan="2" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <!--DWLayoutTable-->
        <tr>
          <td width="9" height="1320">&nbsp;</td>
          <td width="529" valign="top"> <p><strong><font size="6">Our Staff</font></strong></p>
            <%
            If Email <> "" then
            %>
   <font face="Arial, Helvetica, sans-serif" size=3><a href="
mailto:<%= Email %>"><%= StaffName %></a>,&nbsp;<b><%= Position %></font></b>
       <% else %>
    <font face="Arial, Helvetica, sans-serif" size=3><%= StaffName %>,&nbsp;<b><%= Position %></b></font>
    <% end if %>
      <%     
  rs.MoveNext
        wend
%>
   <p>&nbsp;</p>
            <p><br>
            </p>
            </td>
        </tr>
        <tr bgcolor="#CCCC99">
          <td height="68" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="687" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <!--DWLayoutTable-->
        <tr>
          <td width="201" height="619">&nbsp;</td>
        </tr>
        <tr>
          <td height="68" valign="top" bgcolor="#CCCC99"><!--DWLayoutEmptyCell-->&nbsp;</td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="52">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
'Close the recordset and connection string
rs.Close
set rs = Nothing
set ConnectionString = Nothing
%>
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2005 at 10:55am
staff2.asp is 404.
Using Option Explicit will help id asp typos.
Good way to spot html code errors is the w3c validator.

Lead me not into temptation... I know the short cut, follow me.
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: 20 July 2005 at 1:13pm
I have Option Explicit. I don't understand why you are seeing a 404 error. It shows fine for me. I am just unhappy with the way the tables are showing.
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2005 at 1:43pm
The link includes a . after the asp extension.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2005 at 3:06pm
Ahhh...
The page looks "interesting"

The problem is where you've positioned the beginning and ending statements for the loop. Basically, you're putting multiple html pages into one doc by writing all the html within each iteration of the loop. Do a view source and search for html and you'll se what I mean.

I think that what you mean to do is to put the beginning and ending asp statements around just this code:

  <%
            If Email <> "" then
            %>
   <font face="Arial, Helvetica, sans-serif" size=3><a href="
mailto:<%= Email %>"><%= StaffName %></a>,&nbsp;<b><%= Position %></font></b>
       <% else %>
    <font face="Arial, Helvetica, sans-serif" size=3><%= StaffName %>,&nbsp;<b><%= Position %></b></font>
    <% end if %>
      <%     
  rs.MoveNext
        wend
%>
   <p>&nbsp;</p>
            <p><br>
            </p>


Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

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.