Helo Friends,
I am a novice Java programmer, I'm working with Jsp + Javascript to develop a web application.I only have basic Html knowledge and I mostly use "FrontPage" to develop my web pages but currently my webpage requires some dHtml and CSS fundamentals hence I'm posting a query in this forum expecting some guidance,
I have a floating table in my webpage which I achieved using JS. I have written Jsp code to get database records one by one and append it to this table(i.e basically the table is being created on the fly), its all good till here but now I need to make this table scrollable and thats where I'm stuck! I have attached a snapshot of my webpage here and my code(Jsp) is as below:- - <%
-
out.write("<html>\r\n");
-
out.write("<head>\r\n");
-
out.write("<style type=text/css>table.T1 {overflow: scroll}</style>");
-
out.write("<layer id = divStayTopLeft>");
-
out.write("<div align = right>");
-
out.write("<table class = T1 align = right border = 1 width=450 cellspacing = 0 cellpadding = 0 >");
-
out.write("<tr><td bgcolor=#FFFFCC><b>Candidate Name</b></td>");
-
out.write("<td bgcolor=#FFFFCC><b>Batch-ID</b></td>");
-
out.write("<td bgcolor=#FFFFCC><b>Reg Amt</b></td>");
-
out.write("<td bgcolor=#FFFFCC><b>Total Fees </b></td>");
-
out.write("<td bgcolor=#FFFFCC><b>Balance</b></td></tr>");
-
-
// Here I have the code for getting the backend-table's record and appending it to the Html table as a new row.
-
-
out.write("</table>");
-
out.write("</div>");
-
out.write("</layer>");
-
out.write("</head>");
-
out.write("</html>");
-
%>
The above code is supposed to make my table scrollable, but it doesn't work, can someone check it for me please and advice me how to go about it? Or if any other approach of carrying this out please suggest!
6 20552
I have a few minutes right now and I'll work on this. Your code is very, very, very out of date. For example, there is no such thing as a <layer> tag and hasn't been used since 1998, I think.
This is as far as I can go right now. Hope it can get you started. -
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
-
"http://www.w3.org/TR/html4/strict.dtd">
-
<html>
-
<head><title></title>
-
<style type=text/css>
-
#divStayTopLeft{
-
height:100px;
-
overflow:scroll
-
}
-
table.T1 {
-
text-align:center;
-
font-weight:bold;
-
float:right;
-
width:450px;
-
}
-
-
.highlighted {
-
background-color:#ffffcc;
-
border:1px solid black;
-
}
-
-
</style>
-
</head>
-
<body>
-
-
<div id = "divStayTopLeft">
-
<div>
-
<table class = T1 cellspacing = 0 cellpadding = 0 >
-
<tr><td class="highlighted">Candidate Name</td>
-
<td class="highlighted">Batch-ID</td>
-
<td class="highlighted">Reg Amt</td>
-
<td class="highlighted">Total Fees</td>
-
<td class="highlighted">Balance</td></tr>
-
<tr><td>hello</td></tr>
-
<tr><td>hello</td></tr>
-
<tr><td>hello</td></tr>
-
</table>
-
</div>
-
</div>
-
-
</body>
-
</html>
-
I have a few minutes right now and I'll work on this. Your code is very, very, very out of date. For example, there is no such thing as a <layer> tag and hasn't been used since 1998, I think.
Helo and thanks a lot for your time and inputs,much appreciated!
To be honest I just have basic Html knowledge and I have never worked with the <div> and <layer> tags before! this is the script that I've incorporated into my webpage to give my Html-table a floating-effect, and its working fine too but the problem is that now I need the table to be scrollable as well.I tried to apply the CSS -overflow property to this table as one can see in my scriptlet-code..but it doesnt work..not sure if thats even the right way to use 'overflow' !
Presently I'm looking into the code that you have provided here but I still dont know how to place it into my Jsp scriptlet..stil l working on it!
The issue is resolved now using <iframe> and <div>, the iframe is scrollable as well as floating! here is the view
Thanks to this forum for all the help!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Muralidhar |
last post by:
Hi,
I'm having a jsp page which is having a table and a div tag.The
heading such as a radio button,Name , Age etc. are fixed.Only the data
under it is scrolling. So i've set one table for header which are
fixed.
Then a div tag inside which there is a table which is used for
scrolling the data.When i select a radio i'm submitting the form.The
problem is here i'm able to set focus to the radio button, but i'm
unable to maintain the...
|
by: Matt Kruse |
last post by:
This is a typical layout, but I have specific requirements. I'm trying to
figure out a) if it's possible to meet the requirements and b) if so, how.
+---------------+
| header |
+---------------+
| body |
| (scrollable) |
+---------------+
| footer |
|
by: Michael Schuerig |
last post by:
I'm trying to do something seemingly very simple, but it's brought me
close to crushing my head on the keyboard. All I want is a table where
the head row is fixed and the body columns below are scrollable (with
the ordinary scrollbars, no less). Whatever I try, the columns in the
head and the body aren't aligned; the widths are computed independently
which gives a completely ragged look.
Michael
--
|
by: Matt Kruse |
last post by:
This is a common requirement - "freeze panes" in a table, so that some
header rows and some columns on the left are frozen while the body content
scrolls. This makes large tables more usable on screen.
There are a number of solutions available. For example,
http://www.litotes.demon.co.uk/example_scripts/tableScroll.html
I'm just wondering if anyone knows of a "latest and greatest" script to
solve this problem.
My requirement at the...
|
by: david.joyce |
last post by:
I am aware that v7 Static Scrollable Cursors do not work with
pseudo-conversational CICS because of the temp work file being
destroyed but will v8 Dynamic Scrollable Cursors work with
pseudo-conversational CICS due to these cursors directly using the base
table?
| |
by: since |
last post by:
I figured I would post my solution to the following.
Resizable column tables.
Search and replace values in a table. (IE only)
Scrollable tables.
Sortable tables.
It is based on a lot examples I found on the web. Works in IE and mozilla.
http://www.imaputz.com/cssStuff/bigFourVersion.html
|
by: anniejose |
last post by:
I am facing an issue in displaying a calendar popup on click of a calendar icon in one of my JSP pages.
In my JSP page I have 3 calendar icons in a horizontally scrollable table.
If I click the 1st calendar icon, the calendar gets popped up. Then if I click the 2nd calendar icon, the image gets popped up properly. Now I have to scroll to the right to view the 3rd calendar icon. Now when I click the 3rd calendar icon, the calendar image gets...
|
by: phub11 |
last post by:
Hi all,
This is a pretty simple question, but after some hunting on the web I can't find the answer:
I have a table embedded in a scrollable div, and have each cell anchored so that when a click on a button in another table, the div is scrolled to the corresponding cell of the first table. However, it is positioned such that the cell's contents start at the top-left of the window.
Can I add code which centers the contents of the...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |