• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

response.sendRedirect with time delay

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using response.sendRedirect(url) to direct a user another url after they have input some info in a form and clicked submit.
So on the process page of the form, I want to display something like the following before the user is redircetd to another page:
"Thanks for your details...we are taking you back to....."
With my code, the user is simply redirected to the (url) in question when they click on the submit button, and doesn't seen the text I want to display.

Note: Ive just realised it would be something like JavaRanch forums, after you submit a new post, the user is displayed: Sit tight we are taking you back to url; before the user is directed to that url.
Do you know how I would implement this?
[ March 31, 2004: Message edited by: Annemarie McKeown ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaScript
goes to next page in 5 seconds
setTimeout("document.location.href='newPage.jsp'",5000);

Eric
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
alternatively you can try this
<html>
<head>
<META
http-equiv="refresh" content="5;URL=http://www.javaranch.com">
</head>
<body bgcolor="#ffffff">
<center>You will be redirected to javaranch automatically in 5 seconds.
</center>
</body>
</html>
reply
    Bookmark Topic Watch Topic
  • New Topic