?
Solved

Pop up window on login with values coming from Database

Posted on 2004-04-20
5
Medium Priority
?
306 Views
Last Modified: 2012-06-27
I have a JSP application deployed on tomcat  with oracle 8i database. When ever the user logs in, a particular table in the database is checked, if it does not contain any records then everything proceeds normally. But if there are any rows in the table  then a window is poped containing the rows in the table.
How can I achieve this?
Thanks
0
Comment
Question by:rhea234543
[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
5 Comments
 
LVL 6

Expert Comment

by:jarasa
ID: 10867458
Would you please post the code?
Javier
0
 
LVL 6

Accepted Solution

by:
jkna_gunn earned 800 total points
ID: 10867688
to check if there are any records
you would get back a resultset object when you execute the query from a statement object.

a call to rs.next() will return false if no records or true if there are records.

so if true you can then use jsp to write a script comment e.g.

...
if (rs.next()) {
   out.println("<script language=\"JavaScript\">");
   out.println("openPopUp()");
   out.println("</script>");
}
where openPopUp() is defined in the header. you could pass arguments to the popup if you wanted as well.
0
 
LVL 6

Expert Comment

by:jarasa
ID: 10867742
Maybe I missunderstood the question but:

>I have a JSP application deployed on tomcat  with oracle 8i database.

This make me think that he already has that done, but does not know how is made, is that the problem?

Javier
0
 

Author Comment

by:rhea234543
ID: 10868580
>>This make me think that he already has that done, but does not know how is made, is that the problem

1.No. Actually this wasn't a part of the actual application that is deployed and has to be added now.

>> he already has that done
2. Its she not he  
;)
0
 
LVL 6

Assisted Solution

by:jarasa
jarasa earned 200 total points
ID: 10868883
Sorry Rhea,

Normally the name doesn't say much about that point, so I dind't notice it with all those numbers. but is a beautiful one to be honest.

After this..... then the way that jkna_gunn said should be the way to do it, if you need further help just Ask.

There is just one thing that you may consider, and is that to be able to open a new window it should be done on the client not ion the server. That means that you should check wether or not you have records and then make the open window calling again to the server.

:c)

Javier
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The Summer 2017 Scholarship Winners have been announced!
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

764 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