473,748 Members | 6,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making a table visible/invisible depending on some event

157 New Member
Hi all,

I am working on a web application using JSP and Javascript.
I have attached a snapshot of my form here,

I have 2 different Jsps here, viz Jsp1 and Jsp2.
On hitting the 'Show' button on Jsp1 I make another Jsp(Jsp2) pop up as a subwindow containing a Table T1.

But many users have popup blockers turned on and in that case Jsp2 doesnot even show up,so is there any alternative such that I can show Table T1 as a part of Jsp1 itself.The table should appear on top of the form(Jsp1) and not in a different window,i.e it should be invisible at first and only when user hits 'Show' on Jsp1 T1 should be seen.

Can this perhaps be achieved by using <div> ?
I am not much familiar with DOM and Javascript so any suggestions regarding this would be very helpful.
Attached Images
File Type: jpg snapshot1.jpg (6.8 KB, 1512 views)
Jan 23 '07 #1
21 30132
r035198x
13,262 MVP
Hi all,

I am working on a web application using JSP and Javascript.
I have attached a snapshot of my form here,

I have 2 different Jsps here, viz Jsp1 and Jsp2.
On hitting the 'Show' button on Jsp1 I make another Jsp(Jsp2) pop up as a subwindow containing a Table T1.

But many users have popup blockers turned on and in that case Jsp2 doesnot even show up,so is there any alternative such that I can show Table T1 as a part of Jsp1 itself.The table should appear on top of the form(Jsp1) and not in a different window,i.e it should be invisible at first and only when user hits 'Show' on Jsp1 T1 should be seen.

Can this perhaps be achieved by using <div> ?
I am not much familiar with DOM and Javascript so any suggestions regarding this would be very helpful.
You can give a table body tag an id (I'm not sure about giving a table an id) and then use document.getEle mentById('id'). style = "display:no ne";
Jan 23 '07 #2
iam_clint
1,208 Recognized Expert Top Contributor
yes you can give the table itself an id and do the same.
Jan 23 '07 #3
r035198x
13,262 MVP
yes you can give the table itself an id and do the same.
Thanks Clint. That will come handy some time
Jan 23 '07 #4
abctech
157 New Member
Thanks r0 and Clint for the info, but the thing is that the entire form that you can see is itself fitted into a table; the page layout is something like this:-

<html>
<body>
<form>
<table>

This is the main table(say T)
---- The entire page is adjusted inside T, i.e all the Html objects--Labels,Textboxe s, Radio buttons,Dropdow n etc are adjusted into the rows and columns of the table ---

</table>
</form>
</body>
</html>

Now the other table T1 is directly linked to the database table,all the entries that are in T1 are actually records;that is basically I'm constructing table T1 dynamically at page-load hence its size may vary depending on number of records in the backend table..and my requirement is that although T1 is already there somewhere on the page but only when a user clicks 'Show' it should appear(become visible) on top(front) of the form, i.e I need something like I've shown in snapshot3..then there are links on the names and as the user clicks on any link the data for that name must appear in the correspoding textboxes of the form..

Well I think I can handle the link part but for now I dont really know how I can make the table sort of appear like floating on top of the form ..not even sure if that is possible..
Attached Images
File Type: gif snapshot3.gif (9.3 KB, 757 views)
Jan 24 '07 #5
r035198x
13,262 MVP
Thanks r0 and Clint for the info, but the thing is that the entire form that you can see is itself fitted into a table; the page layout is something like this:-

<html>
<body>
<form>
<table>

This is the main table(say T)
---- The entire page is adjusted inside T, i.e all the Html objects--Labels,Textboxe s, Radio buttons,Dropdow n etc are adjusted into the rows and columns of the table ---

</table>
</form>
</body>
</html>

Now the other table T1 is directly linked to the database table,all the entries that are in T1 are actually records;that is basically I'm constructing table T1 dynamically at page-load hence its size may vary depending on number of records in the backend table..and my requirement is that although T1 is already there somewhere on the page but only when a user clicks 'Show' it should appear(become visible) on top(front) of the form, i.e I need something like I've shown in snapshot3..then there are links on the names and as the user clicks on any link the data for that name must appear in the correspoding textboxes of the form..

Well I think I can handle the link part but for now I dont really know how I can make the table sort of appear like floating on top of the form ..not even sure if that is possible..
Something like this?
Jan 24 '07 #6
r035198x
13,262 MVP
There is also a script here
Jan 24 '07 #7
abctech
157 New Member
There is also a script here
Hey r0,Thanks a bunch for these 2 links..I think this is it!

Although I've to customize this code to suit my requirement but atleast I'm not as clueless as I was a while ago..Thanks again :)
Jan 24 '07 #8
abctech
157 New Member
Helo again,

This is how my page looks right now..but a slight prob again, can anyone suggest to me how we can make a scrollable floating table?
Attached Images
File Type: jpg snapshot4.jpg (6.0 KB, 1530 views)
Jan 25 '07 #9
iam_clint
1,208 Recognized Expert Top Contributor
http://www.w3schools.com/css/pr_pos_overflow.asp

check out this link
Jan 25 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

10
7024
by: idiotprogrammer | last post by:
Hi, there, I'm trying to do something, and part of the problem is that I don't know how to describe the effect. One block will have a list of links stacked over one another and separated by p tags. When the user hovers over any link inside this block, a description of a link will appear slightly to the right of the link (let's say 1 inch
1
17674
by: R.G. Vervoort | last post by:
is it possible to make an select visible or invisible by selecting a checkbox. Thanks for suggestions Roy
1
4208
by: PCB | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if certain fields in a table are a certain value. The buttons are adjacent to each record (i.e. - if there are 5 records, there would be 5 buttons; 10 records, 10 buttons; etc.) Here is the subroutine I've written so far: Public Sub IsButtonVisible()
1
1980
by: Susan van Houen | last post by:
Hi, Classic ASP programmer moving to ASP .NET and I have the following problem: I am constructing a page where there are a number of radio buttons and a number of label/textbox. The visibility of the label/textbox is dependent on which radio button the user
6
14696
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm using the Imagebutton.Attributes.Add("onMouseOver","this.src = 'somepicture.jpg') and that works fine. I've tried some java script to change the other control's visible property by changing is className, but that doesn't seem to work
1
3153
by: SP | last post by:
Hello there, I have a DataList create as below. <asp:DataList ID="dl_Immunpsuppressive_Main" Runat="server" Width="100%"> <ItemTemplate> <table id="Immunpsuppressive_Main" width="100%" border="0"> <tr> <td class="sub" width="50%" colSpan="2">
4
7784
by: rcwoodard | last post by:
Hello all. I have a continuous form that I need to make a field invisible or visible depending on the selection in another field. I have tried using Form_Current() and the following code: Private Sub Form_Current() If VisitType = 3 Then Me.cboMonitor.Visible = True Else Me.cboMonitor.Visible = False End If
4
10043
jo3n
by: jo3n | last post by:
I know I saw it here last week but can't locate it now. What is the syntax/settings for making fields in a form (subform) visible/invisible based on a combo box?
4
3215
by: TS | last post by:
I am losing my colgroup html element of a table that i toggle back and forth of being visible=true/false. is there any workaround since the rendered html doesn't contain it even though it has not been explicitely been made invisible? note also that even when the table is made visible=true, colgroup still doesn't show up
0
9544
Oralloy
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...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
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,...
0
9247
tracyyun
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...
0
8243
agi2029
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...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
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
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.