Thread: Remove colums

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    6
    Rep Power
    0

    Remove colums


    Hi members how can i improve my code so that the data displayed doesnt have colums in it .


    Code:
    <% Option Explicit %>
    <html>
    <head>
    <title>List of Checked Items</title>
    </head>
    <body>
    <%
    	Dim Conn,strSQL,objRec,chkDel, myChkBoxes,chkbox,iResultsNum
    	Set Conn = Server.Createobject("ADODB.Connection")
    		Conn.Open "Driver={SQL Server};Server=kcc2;Database=slis;UID=sula;PWD=sul  a;"
    		
    		
    	%>
    <table width="851" border="1">
      <tr>
        <th width="144"> <div align="center">Title </div></th>
        <th width="124"> <div align="center">callno </div></th>
        <th width="166"> <div align="center">Author </div></th>
        <th width="108"> <div align="center">Category </div></th>
        <th width="79"> <div align="center">classe </div></th>
        <th width="120"> <div align="center">subject code </div></th>
        <th width="64"> <div align="center">Tick </div></th>
      </tr>
    <%
    For Each  chkDel in Request.Form("chkDel")
    	strSQL = "select * FROM books WHERE autono = "& chkDel 		 
        Set objRec	= Server.CreateObject("ADODB.RecordSet")
    		objRec.open strsql, Conn
    	If objRec.EOF Then
    		Response.write (" Not found record.")	
    	Else
    		
    		Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
    		PageLen = 2 
    		PageNo = Request.QueryString("Page")
    		
    		'Response.Write("page")
    		'response.End()
    		
    		if PageNo = "" Then PageNo = 1
    		TotalRecord = objRec.RecordCount
    		objRec.PageSize = PageLen
    		TotalPage = objRec.PageCount
    		objRec.AbsolutePage = PageNo
    		end if 
    		
    		No=1
    		Do While Not objRec.EOF and No <= PageLen
    
    %>
    	<tr>
    	<td><div align="center"><%=objRec.Fields("Title").Value%></div></td>
    	<td><%=objRec.Fields("callno").Value%></td>
    	<td><%=objRec.Fields("author").Value%></td>
    	<td><div align="center"><%=objRec.Fields("Category").Value%></div></td>
    	<td align="right"><%=objRec.Fields("classe").Value%></td>
    	<td align="right"><%=objRec.Fields("subjectcode").Value%></td>
        <td align="center"><input type="checkbox" name="chkDel" value="<%=objRec.Fields("autono").Value%>"></td>
      </tr>
      <%
      No = No + 1
    		objRec.MoveNext
    		Loop
    		%>
    <%
    Next
    %>
    </table>
    	Total : <%=TotalRecord%> Records.  Page <%=PageNo%> (All Page <%=TotalPage%>)
    	<% IF Cint(PageNo) > 1 then %>
    	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=1"><< First</a> 
    	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo-1%>">< Back</a>
    	<% End IF%>
    	<% IF Cint(PageNo) < TotalPage Then %>
    	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo+1%>">Next ></a> 
    	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=TotalPage%>">Last >></a>
    	<% End IF%>
    	<br>
    	Go to
    	<% For intID = 1 To TotalPage%>
    	<% if intID = Cint(PageNo) Then%>
    	<b><%=intID%></b>
    	<%Else%>
    	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=intID%>"><%=intID%></a>
    	<%End IF%>
    	<%Next%>
    	<%
    	
    
    	Conn.Close()
    	'Set objExec = Nothing
    	Set Conn = Nothing
    %>
    </body>
    </html>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    You're using a table. Tables have rows and columns. Unless there's something I'm missing, maybe a screenshot of the results would help.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    6
    Rep Power
    0
    Originally Posted by Ronster
    You're using a table. Tables have rows and columns. Unless there's something I'm missing, maybe a screenshot of the results would help.
    Ronster : What i want is i dont want the data to be displayed showing the colum lines and row lines isnt there a way of hiding them
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,429
    Rep Power
    4539
    View the page source in your browser and figure out what html you need to change. Then visit your asp code and figure out how to modify it to create the desired html in the browser.

    If you don't know what html to change you need to ask in the html forum.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    Originally Posted by makumbi
    Ronster : What i want is i dont want the data to be displayed showing the colum lines and row lines isnt there a way of hiding them
    You didn't say you wanted the LINES removed, you said you wanted the COLUMNS removed. Big difference.

    The lines are called BORDERS. You have the attribute:
    Code:
    border="1"
    in your table definition. Remove that, no lines.

IMN logo majestic logo threadwatch logo seochat tools logo