473,699 Members | 2,248 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 30126
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, 753 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
7003
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
17673
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
4205
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
1975
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
14693
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
3144
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
7775
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
10040
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
3212
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
8689
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8618
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,...
1
8916
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
7752
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
6534
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
5875
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();...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2010
bsmnconsultancy
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...

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.