Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

scroll table

Posted on 2002-03-14
6
Medium Priority
?
188 Views
Last Modified: 2012-06-27
I have a table with 16 columns. I would like scroll across the table but would like the first 3 rows to remain in position.

P.S. The data for the tables are retieved from a database

On another note is it possible to pass a variable in the address to a frame.
0
Comment
Question by:a-dre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
bruno earned 200 total points
ID: 6865680
scrolling table courtesy of Cd&...will need modifying to do what you wnat...


-------------------------------
<html>
<head>
  <title> scrollable table</title>
<style>
  body {background-color:moccasin}
  th {color:snow;background-color:darkkhaki}
  td {color:navajowhite;background-color:navy}
  .maindiv {background-color:tan}
</style>
<body>
  <div style="position:absolute;left:100;top:10">
     <table frame="border" width = 480>
        <col width=80>
        <col width=80>
        <col width=80>
        <col width=80>
        <col width=80>
        <col width=80>
        <tr>
           <th>first</th>
           <th>second</th>
           <th>third</th>
           <th>fourth</th>
           <th>fifth</th>
           <th>sixth</th>
        </tr>    
     </table>
     <div class="maindiv" STYLE="overflow-X:hidden;overflow-y:scroll;width:496;height:300;">
        <table frame="border" width=480 height=1200 >
        <col width=80>
        <col width=80>
        <col width=80>
        <col width=80>
        <col width=80>
        <col width=80>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
        <tr>
           <td height=60>Cd&</td>
           <td height=60>:^)</td>
           <td height=60>colC</td>
           <td height=60>xxxx</td>
           <td height=60>:^)</td>
           <td height=60>Cd&</td>
        </tr>
     </table>
  </div>    
  <table border=1 width=480 bgcolor="silver">
     <col width = 80>
     <col width = 80>
     <col width = 80>
     <col width = 80>
     <col width = 80>
     <col width = 80>
     <tr>
        <th></th>
        <th></th>
        <th></th>
        <th></th>
        <th></th>
        <th></th>
     </tr>    
  </table>
</div>
</body>
</html>

-----------------------------------



BRUNO


0
 
LVL 3

Expert Comment

by:barryfandango
ID: 6866065
to pass a variable from the address, or querystring, to a frame inside the page, you can just relay the code through your frameset page.  For example,  you might call up your page with frames like this:

http://www.hello.com/thepage.asp?variable=xxx

where thepage.asp contains your frameset.  Then, within thepage.asp, include code like this when specifying the asp pages within the frames:

<frameset cols="180,*">
    <frame noresize name="LeftMenu" target="Main" src="LeftMenu.asp">

    <frame name="Main" src="home.asp?variable=<%=request.querystring("variable")%>" target="_self" marginwidth="5" marginheight="5" scrolling="auto">

Notice the snippet of ASP in the second frame declaration that passes on the code from the first URL.

good luck!
0
 

Author Comment

by:a-dre
ID: 6867942
brunobear
your comment is exactly what I am looking for, but, could you explain your code I am not too sure how this works.
I am new to web page designing
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:bruno
ID: 6868460
well it is all pretty straightfoward except for the second div..


    <div class="maindiv" STYLE="overflow-X:hidden;overflow-y:scroll;width:496;height:300;">


in which the "overflow-y" so that is overflow on the y axis, which is verticle, is going to be set to "scroll"

as you want to scroll across the table, you would want the x axis to be scrollable...


    <div class="maindiv" STYLE="overflow-X:hidden;overflow-x:scroll;width:496;height:300;">



you can change the width and height to be whatever you need....

all the other code should be pretty straightfoward?  it's just tables...

let me know if it is not...


BRUNO
0
 

Author Comment

by:a-dre
ID: 6926134
This code is great thanks alot. This was exactly what I wanted
0
 
LVL 18

Expert Comment

by:bruno
ID: 6926650
Glad I could help!  Thanks for the A.  :-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question