If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > problems printing out

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-04, 18:29
slidj slidj is offline
Registered User
 
Join Date: Mar 2004
Posts: 11
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
Reply With Quote
  #2 (permalink)  
Old 03-07-04, 19:00
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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...
Reply With Quote
  #3 (permalink)  
Old 03-07-04, 19:55
slidj slidj is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 03-07-04, 20:32
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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>"
%>
Reply With Quote
  #5 (permalink)  
Old 03-07-04, 22:13
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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...
Reply With Quote
  #6 (permalink)  
Old 03-08-04, 07:48
slidj slidj is offline
Registered User
 
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?
Reply With Quote
  #7 (permalink)  
Old 03-08-04, 16:06
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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.
Reply With Quote
  #8 (permalink)  
Old 03-09-04, 05:20
slidj slidj is offline
Registered User
 
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?
Reply With Quote
  #9 (permalink)  
Old 03-09-04, 17:06
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On