Click to See Complete Forum and Search --> : ugly display
Calmaris
04-04-2003, 10:18 AM
I have a page that displays the contents of a record in a database that when displayed, if the contents are very long it stretches the table's length across the whole page and looks very ugly how do you set the table so that it only expands downward not across.
I checked the html section and no one has an answer, can this be in asp using vbcrlf or something?
Ribeyed
04-04-2003, 11:33 AM
hi,
can you give an example?
Calmaris
04-04-2003, 11:41 AM
go to www.northshore-adventures.com
click on view stories
if the user doesn't press enter then it does one line across the whole web page, UGLY.
here is my code
<% @Language = VBScript %>
<% Option Explicit %>
<%
Dim dbConn, dbQuery, recordsetDB, strStories, strQueryString1,strUser_Id
Dim Hunt_Id, Hunt_Password, CurPage, NumPages
Hunt_Id = request.form("OldHunt_Id")
Hunt_Password = request.form("Hunt_Password")
Set dbConn = Server.CreateObject("ADODB.Connection")
dbConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\premfs7\sites\premium2\nsadvenventures\Database\Stories.mdb")
strquerystring1 = "SELECT Stories.Stories, Stories.Hunt_Id FROM Stories "
Set recordsetDB = server.createObject("ADODB.recordset")
recordsetDB.CursorLocation =3
recordsetDB.PageSize =10
recordsetDB.Open strquerystring1, dbconn
numpages = recordsetDb.PageCount
CurPage = CInt(request.querystring("Page"))
If curpage < 1 Then Curpage = 1
If curpage > Numpages Then Curpage = Numpages
recordsetDB.AbsolutePage = Curpage
%>
<html>
<head>
<title>View Stories</title>
</head>
<body background="grback.jpg">
<p align="center"><img border="0" src="THEGREATSTORIES.gif">
<p>
Page <%=CurPage%> Of <%=NumPages%>
<% Do While recordsetDb.AbsolutePage = Curpage AND NOT recordsetDB.EOF%>
</p>
<table border="3" width="504" height="100" bordercolordark ="darkGreen" bordercolorlight="lightgreen" Wrap="Virtual">
<tr>
<td>
<%
strStorieS = recordsetDB("Stories").VALUE
strUser_Id = recordsetDB("Hunt_Id").Value %>
Submitted by <% response.write ""& strUser_Id & "" %><P>
<%response.write ""& strStories &"" %>
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
</td>
</tr>
</table>
<%
recordsetDB.MoveNext
Loop
recordsetDB.close
%>
<form Name ="Navigate" METHOD="POST" ACTION="View_Storie.asp" onSubmit="return false;">
<input type="HIDDEN" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<input type="HIDDEN" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="Submit" value="First Page" onClick="
self.location.href = '<%=Session("Page")%> ?Page=1';
return true;">
<input type="Submit" value="Prev Page" onClick="
self.location.href = '<%=Session("Page")%>?Page=<%=(curPage-1)%>';
return true;">
<input type="Submit" value="Next Page" onClick="self.location.href =
'<%=Session("Page")%>?Page=<%=(curPage+1)%>';
return true;">
<input type="submit" value="Last Page" onClick="
self.location.href = '<%=Session("Page")%>?Page=<%=numPages%>';return true;">
</form>
<form NAME="Back_TO_Main" METHOD="POST" ACTION="LoggedMainPics.asp">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">GO BACK
TO THE MAIN MENU <input type="submit" value="GO" name="backview">
</form>
Calmaris
04-04-2003, 11:54 AM
heh, thanks, good idea, maybe somethings in life are easier than they seem.
Alex
Calmaris
04-04-2003, 12:14 PM
ok putting a table inside the table didn't work it just grows with the other table, unless there is a way to make it a fixed length? I hate html, sort of.
Ribeyed
04-04-2003, 01:08 PM
view stories
can't see a link for that anywhere:confused: :confused:
khaki
04-04-2003, 01:46 PM
okay...
first of all...
you double-posted (htlm forum also)
second...
the link that you provide doesn't have a "view stories" link.
I think that might be because you have some password accessed page that leads to that link (?).
Just one suggestion on that: If you don't need a password protected area (and I mean really need), then don't use one just for the sake of having one.
third...
your site looks vastly different for cross-browser viewing (maybe you don't care... but I'm just telling you).
Lastly...
without an actual view of the data-generated table itself, it's tough to say... but you may need to "break-apart" some fields and place them below (or in a different link) in order to display all of the information.
You really need to provide a link to the data if you want further help.
So... the balls in your court.
and... you may want to re-design the menu/frame thing. It is very inconsistent and sometimes redundant on some pages (and have you ever seen your site in a Netscape or Opera browser?).
I'm not trying to be critical... but you asked for help on something... and there are other areas that need help as well. It's all do-able, so... we'll deal with each item as we go.
First priority... we need the correct link to the data.
;) k
jdavia
04-04-2003, 02:25 PM
Originally posted by Calmaris
I have a page that displays the contents of a record in a database that when displayed, if the contents are very long it stretches the table's length across the whole page and looks very ugly how do you set the table so that it only expands downward not across.
I checked the html section and no one has an answer, can this be in asp using vbcrlf or something?
Your editing, it seems needs to be done in the (I have a page that displays the contents of a record). Try doing the table thing in there, that was suggested.
khaki
04-04-2003, 02:41 PM
y'know... actually - after looking at your code - I see that you have not declared a column width (table width, yes... column width no).
I'm curious...
And I see that - aside form apparently speaking to... and answering yourself :confused: - you also say "I hate html, sort of".
HTML?
You hate HTML?
Do you know HTML?
(Hate? javascript, yeah. SQL, sure. ASP, ok. But HTML.... ????)
Does anybody really hate HTML???!!!
I'd be happy to help you Calmaris... but what are we dealing with here?
Please provide a link to that data.
I will try to create a table for you.
(your freaking me out y'know. Hate html??? whew!!!)
:confused: :rolleyes: ;) :) k
jdavia
04-04-2003, 03:06 PM
You say:
click on view stories if the user doesn't press enter then it does one line across the whole web page,
That is not very clear. clicking on view stories I suppose opens another page. Where does pressing enter come to play? and if you didn't press enter, it is source that you see or the actual Data. I am thinking of something small concerning that link to the page.
jdavia
04-05-2003, 12:30 AM
Maybe the answer was given in the other thread. But what kind of data with no spaces could it be to stretch the table besides code? Images weren't mentioned
Calmaris
04-05-2003, 05:06 PM
i figured it out i just used word wrap, your supposed to click on the events button on the top and click on view stories, the logon is for people to be able to add stories comments, etc. and because there is an admin section to maintain the databases. lol and no i don't hate Html it was the thought of the moment. it all works goog for now, thx for critism. lol not what i expected, thx.
Alex