SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: scrolling

  1. #1
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    scrolling

    How to keep the title of columns as we scroll the page? Thanks for any reply.
    -1/2=999?

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can use CSS style position:fixed
    Saul

  3. #3
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you kindly give me an example.
    -1/2=999?

  4. #4
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So do you mean this:
    Code:
    <div style="width:400px;background-color:#CCCCCC;border-bottom:1px #000000 outset;">Title goes here..</div>
    <div style="width:400px;height:200px;overflow:scroll;border-bottom:1px #000000 outset;">
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    Description DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescriptionDescription DescriptionDescription
    </div>
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  5. #5
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fine, thanks. Yes. it works. Actually I wanted to scroll the page with its own scroller. So I need to keep the titr (first row) so as long as we go down the screen's scrolller something (the Titr) falls down.
    -1/2=999?

  6. #6
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you think of some DHTML?
    -1/2=999?

  7. #7
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This code is somehow close to what I need;
    Code:
    <html>
    <head>
    <script type="text/javascript">
    var timer
    function scrolltop()
    {
    document.getElementById('scrollmenu').style.top=document.body.scrollTop
    timer=setTimeout("scrolltop()",1)
    }
    function stoptimer()
    {
    clearTimeout(timer)
    }
    </script>
    </head>
    
    <body onload="scrolltop()" onunload="stoptimer()">
    <span id="scrollmenu" style="position:absolute">
    <b>Menu</b><br />
    <table>
    <tr>
    <td><a href="http://www.w3schools.com">W3Schools</a></td>
    <td><a href="http://www.w3schools.com">Microsoft</a></td>
    <td><a href="http://www.w3schools.com">Altavista</a></td>
    </tr>
    </table>
    </span>
    
    <table border="0" width="100%">
    <tr>
    <td width="100"> </td>
    <td>Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    Scroll this page to see the "always-on-top" menu
    <br /><br /><br /><br /><br />
    </td>
    </tr>
    </table>
    
    </body>
    </html>
    But while scrolling the page, the items pass from the below the menu items. What do you think?
    -1/2=999?

  8. #8
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    setting same columns in different rows come with each other

    Could you kindly help me about this;

    The columns are not in the same order, why is that?
    I am in failure of showing each row of the resultset follow under its column name. What's wrong!
    Code:
    <html >
    <%@ page import = "java.sql.*,java.text.*,java.util.*,java.net.*,com.util.*" %>
    
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>TT03 Advanced Search Result</title>
    <meta name="keywords" content="TT03  Search Result">
    <meta name="description" content="TT03  Search Result">
    <script type="text/javascript">
    var timer
    function scrolltop()
    {
    document.getElementById('scrollmenu').style.top=document.body.scrollTop
    timer=setTimeout("scrolltop()",1)
    }
    function stoptimer()
    {
    clearTimeout(timer)
    }
    </script>
    
    </head>
    
     	<%
    String key=(String)request.getAttribute("key");
    ResultSet result=(ResultSet)request.getAttribute("result");
    int p= Integer.parseInt((String)request.getAttribute("p"));
    boolean firstrow=true;
    int rowsPerPage=util.rowsPerPage;
    int perPage=util.perPage;
    int first=1; 					
    String MESCNumber="";
    String Unit="";
    String Marker="";
    String Description="";
    String PartNumber="";
    String SpecialInfo="";
    String StandardCode="";
    String MIS="";
    String recordCount="";
    String ID_User=(session.getValue("ID_User")).toString();
    System.out.println("ID_User*** "+ID_User);
    					%>
    
    <body onload="scrolltop()" onunload="stoptimer()">				
    							
    <table><tr>
    <td>
    <span id="scrollmenu" style="position:absolute">
    <div style="width:900px;background-color:#ffCCCC;border-bottom:-1px #000000 outset;">
    
    		<table border="1" width="900" align="center">
    		<tr>
    			<td align=center colspan="10">	
    			<font size="2" color="#040000" face="Times New Roman">
    			Advanced search in library<span lang="fa">
    			</font>
    			</td>
    		</tr>
    		<tr>
    		<td width="4"><b>No</b></td>
    		<td width="2"><b>M </b></td>
    		<td width="10"><b>MESC</b></td>
    		<td width="2"><b>Unit</b></td>
    		<td align=center width="50"><b>Description</b></td>
    		<td align=center width="14"><b>Part No.</b></td>
    		<td align=center width="19"><b>Special Info.</b></td>
    		<td align=center width="1"><b>S.C.</b></td>
    		<td align=center width="2"><b>M.I.S.</b></td>
    		</tr>
    		</table>
    
    </div></span>
    </td>
    
    <td>
    <span id="item">
    <div style="width:900px;background-color:#CCCCFF; border-bottom:1px #000000 outset;">		
    <table border="1" width="900" align="center">
    <%int count=0;							   
     while(result.next())
    {
    			count++; 
            	MESCNumber=result.getString("MESCNumber");
            	Unit=result.getString("Unit");
    	        Marker=result.getString("Marker");
    	        Description=result.getString("Description")!=null?result.getString("Description"):"";
            	PartNumber=result.getString("PartNumber")!=null?result.getString("PartNumber"):"";
            	SpecialInfo=result.getString("SpecialInfo")!=null?result.getString("SpecialInfo"):"";
            	StandardCode=result.getString("StandardCode")!=null?result.getString("StandardCode"):"";
            	MIS=result.getString("MIS")!=null?result.getString("MIS"):"";
    			System.out.println(MESCNumber);
    %>
    		
    		<tr>
    		<td width="4"><%=count%></td>
    		<td width="2"><%=Marker%></td>
    		<td width="10"><%=MESCNumber%></td>
    		<td width="5"><%=Unit%></td>
    		<td width="50"><textarea rows=1 name=<%=Description%> cols="0"><%=Description%></textarea></td>
    		<td width="14"><%=PartNumber%></td><td></td>
    		<td width="19"><%=SpecialInfo%></td><td></td>
    		<td width="1"><%=StandardCode%></td>
    		<td width="2"><%=MIS%></td>
    		</tr>		
     <%                                     
     }     
     %>
    </table></div></span>
    		 
    </td>
    </tr>
    </table>
    
    																									
    </body>
    
    </html>
    -1/2=999?


Bookmarks

Posting Permissions

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