Solved

Pop up window on login with values coming from Database

Posted on 2004-04-20
5
305 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 200 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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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