Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect user after updation

Status
Not open for further replies.

vikramonline

Programmer
Oct 14, 2003
186
IN
I use Recordset paging ( 10 records page) to display records from the Access database.User has the option to click any record and update it.
Everything works fine.What I want is that after updation a loading message like "Record Updated" should get displayed and then the user should be automatically redirected to the page,from where he had clicked the record,with updated data.
 
If you save the search values in session or cookie values (as well as the page number) then you could take them back to the correct page pretty easily. Basically have a page that times out and redirects to the results page, then either check the sesion/cookie in the results page or have the redirect page load from the session/cookie and add it to the querystring of the results page. Yopu can do the redirect with either a javascript SetTimeout or a Meta tag.

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Tarwn, there is a lot of confusion in my mind ,can u please explain a bit.
 
An example of tarwn's suggestion:

Code:
<script language="javascript">

function linkClick(url) {
    var currentLocation = window.location; //set current location
    document.cookie="location="+ currentLocation; //write location to cookie
    window.location=url;
}
</script>

<!-- Edit button link -->
<a href="#" onclick="linkClick('mypage.htm')">Click here</a>

Then in your asp page you provide a back button. Set the link for the URL based on the cookie.

Code:
<%
previousLocation = request.cookies("location")
%>

<!-- button link -->
<a href="<%=previousLocation%>">Go back</a>

or if you have a form handler for your changes just add

Code:
<%
url = request.cookies("location")
response.redirect (url)
%>

Hope it helps

Wow JT that almost looked like you knew what you were doing!
 
Thanx Pix and Tarwn for ur input.
Now I understand the point.
I will definitely give it a try and let u know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top