|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I need a simple way to move to a generated page and have it REFRESHED - like using the 'refresh' button. I was given the following code and it doesn't work (though the guy who gave it to me swears it 'should'). The page is being output by a Java servlet.
"<input type=button value=Back onClick='.location.replace(sReferringPage)'>"); OR //out.println("<input type=button value=Back onClick='.location.replace('URL')'>"); What's the EXACT syntax? I get a 'page error' message when I run it in IE 5.5. Any help would be greatly appreciated. It would be idea if I could capture the calling pages URL into a variable and use it rather than hardcoding the 'URL' portion of the method. Any pointers to books that explain these seemingly tasks would be greatly appreciated. |
|
#2
|
||||
|
||||
|
You need this HTML:
<input type="button" value="Back" onClick="parent.location='mypage';"> Wrap that in an out.println(). An easy way to make sure it's not cached is to include the system time in the request: Code:
out.println("<... onClick=\"parent.location='mypage?time="+System.currentTimeMillis()+"';\">");
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > REFRESH using servlets |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|