Solved

How to Refresh my Page if a cretain condition is MET

Posted on 2004-08-15
5
656 Views
Last Modified: 2008-02-01
hello JSP wizards,
                         I am a novice web programmer, doing my college project in JSP. Before i explain my Problem. I need to refresh My page if a certain condition is Met. How do i do this.. The page should be refreshd automatically when this contition is met. This condition is not time dependant. If it were then i would have used the < meta tag> and specified the refresh duratino in seconds. But here i am actually reading records from a database upon the click of a Button and if a particular colum's data matches certain condition i need to forcefully refresh my page without the user having to click the REFRESH Button of the browser..
                      How do i do this ? Pls guide Me

Thanx
novice JSP programmer.
0
Comment
Question by:FearFactor_x
[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
5 Comments
 
LVL 3

Expert Comment

by:pulupul
ID: 11803617
Could you give more details?. HTTP is one-direction. I mean, the client can ask the server to send the page again, but once the page is loaded and the connection closed, the server (where the JSPs are executed) cannot contact the client in any way.
In your case maybe JavaScript could do the job, as with JS you can force refresh of the page from the client, but depends on the details of your case. However is not good to depend much on JavaScript.
0
 
LVL 3

Accepted Solution

by:
sbockelman earned 25 total points
ID: 11803978
use JavaScript

something like ...

onclick="doHandleChange(this);"

function doHandleChange( obj ) {

// if obj's new value matches some condition, load a new page

location.replace( <url with params to new page view >, true );

}
0
 
LVL 27

Assisted Solution

by:rrz
rrz earned 25 total points
ID: 11804200
In your db page, you could use  

if(condition_is_Met){
                              response.sendRedirect(request.getHeader("referer"));
}

rrz
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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
By reading this blog, MSPs will gain insight into how to improve communications with their clients as well as establish a more profitable business.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

732 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