Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Unanswered: problems printing out

    i having a problem printing out a date field on my web page from my database, the dates are for when a club event is. i have the code below to print out the date but it always prints each date in the database on top of the other so is totally unreadable.

    <%
    Response.Write rs.Fields("date").Value
    %>

    i have tried to use a carriage return but that just puts the whole thing on the next line! i need some sort of loop but what i have come up with so far hasnt worked. any ideas?

    thanks in advance

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    when you say carriage return are you talking vbCrLf or <br>??

    <%
    Response.Write rs.Fields("date").Value & "<br>"
    %>

    should drop a line and then print the date...

    If you can provide an example of what your results are and what you want them to be that might help...

  3. #3
    Join Date
    Mar 2004
    Posts
    11
    sorry, didnt explain it well.

    i have a list of dates i want to display from the database one underneath the other like so:

    28/3/04
    30/3/04
    31/3/04
    etc..

    these are the dates of a club event taken from my database. but it reads them out at the same point on the page, so they are actually printed on top of each other.

    if you go to this link

    http://aa.1asphost.com/slidj/night.asp

    and select a night from the list you will see what happens when the date is displayed

    thanks

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Unfortunately I can't get to that page as my poxy proxy is killing it somehow....

    But, unless you are using a style sheet to enforce the position what I have above should work....
    eg.

    <%
    Response.Write rs.Fields("date").Value & "<br>"
    %>

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    I finally made it to your site. The problem is that you are applying a style and using absolute positioning... this is causing the dates to be printed over each other...

  6. #6
    Join Date
    Mar 2004
    Posts
    11
    cheers! it now prints them out underneath each other.

    i remove the absolute from the style, but now it prints it in the top left hand corner! how can i position them back to the correct place without using absolute?

  7. #7
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    If you look at your page the whole thing is using absolute positioning this means that your layout is primarily fixed (eg. there is little room for dynamic multi-line data).

    Personally I'd avoid absolute positioning completely, you really don't need it.

  8. #8
    Join Date
    Mar 2004
    Posts
    11
    im still not really sure what to do though. if im not using position absolute how can i position them on the screen?

  9. #9
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    use a table to do you layout. that way you and add content to a table cell and have it expand to contain what you want to display in it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •