Solved

Go back and refresh

Posted on 2004-04-27
8
631 Views
Last Modified: 2012-05-04
Hi,

I'm using Javascript with JSP and after running a query I am using the Go- back method in Javascript.

The problem is when the page goes back it needs to refresh so the update will take place.

Please help
0
Comment
Question by:Pigdogmonster
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:TheImmortal
ID: 10928958
Rather than use the history, you can get the page that called your query JSP from the Referrer header and redirect to it. This will cause the calling page to reload/refresh.  
0
 

Author Comment

by:Pigdogmonster
ID: 10929027
ok - how do i do that? :-)
0
 
LVL 2

Accepted Solution

by:
TheImmortal earned 20 total points
ID: 10929092
Your JSP would look something like this:

<%

refpage = request.getHeader("referrer");

/**
   * Query stuff
   */

response.redirect(refpage);

%>
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Pigdogmonster
ID: 10929477
I think I know what you are saying and I have tried doing it that way i.e. re-run the query but I canot get it to work!


I did get go back and refresh thing to work once,  I think I used something like

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />

on the page but for some reason this does not refresh the page,  all I what is for the page to refresh itself!  How hard can this be?
0
 
LVL 2

Expert Comment

by:Zeyadss
ID: 10981530
Maybe if you give me the code you are using at current, and I can probably solve the problem.
0
 

Author Comment

by:Pigdogmonster
ID: 10984449
well the problem seems only to be local to my machinen and works fine on my collegues?

0
 
LVL 2

Expert Comment

by:TheImmortal
ID: 10985477
Most likely your Cache settings are not set to check for new version of the page upon every visit. Look at your Tools - > Internet Options -> Temporary Internet File Settings (if you are using IE).
0
 
LVL 2

Expert Comment

by:TheImmortal
ID: 10985498
Most likely your Cache settings are not set to check for new version of the page upon every visit. Look at your Tools - > Internet Options -> Temporary Internet File Settings (if you are using IE).
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tiny glitch in my main slider 3 38
how can i make 2 columns? 4 36
Javascript 2 20
Search Item in Table 2 19
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 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