Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Pop up window on login with values coming from Database

Posted on 2004-04-20
5
Medium Priority
?
308 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 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