Solved

Pop up window on login with values coming from Database

Posted on 2004-04-20
5
300 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
  • 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now