|
| |
|
|
bige
Posts: 42 Joined: 12/26/2003 Status: offline
|
history.back and refresh - 5/25/2005 16:08:41
Hello everyone, I think that I have a unique problem but perhaps someone has come across a solution before. Situation: I have a DRW that returns results and then within that table I added buttons that change the status of the documents that I am tracking. Example; I have an order then they click the button and mark it printed, processing, etc. When they click the button it goes to the update page and simply changes the status. The users wanted to be returned to the screen they updated from so that they could continue down the list and mark the rest of the orders returned for example on a search. I achived this by using the history.back (-1) which takes them back to the page they click the update status button from. The problem is that the page does not show the new status without doing a refresh. Question: 1) Is there a better method to get the user back to the origin page? 2) If not how do I get the page to refresh after the redirect to show the new status? Thanks in advance
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: history.back and refresh - 5/25/2005 16:22:04
ON ASP pages, I frequently use: <a href="<%=Request.servervariables("HTTP_REFERER")%>">BACK</a> That works in many situations. Also, you can use "no cache" header stuff like this: <% Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "Cache-Control", "must-revalidate" Response.AddHeader "Cache-Control", "no-cache" %> But that'll force you to click the Retry button when using the back button or history(-1). That any help?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
bige
Posts: 42 Joined: 12/26/2003 Status: offline
|
RE: history.back and refresh - 5/25/2005 16:25:08
Where exactly does this code go? <% Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "Cache-Control", "must-revalidate" Response.AddHeader "Cache-Control", "no-cache" %> Does it go before the <html> or in the <head>? I tried in several places. BTW i am inserting this in the Results.asp page not the update.asp page right? I tried inserting at the top of the Results.asp page and it returns me to the Results.asp page but I get page cannot be found error. When I hit refresh it does not remember the query string so I get no records returned. Any other suggestions or is there something I am doing wrong?
< Message edited by bige -- 5/25/2005 16:32:36 >
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: history.back and refresh - 5/27/2005 13:40:52
quote:
Where exactly does this code go? Sorry, been away. That code goes before the <HTML> tag. When you put that code on a page it gives you "Page cannot be found"? or is it an error message other than that - some other error perhaps?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
fredecd
Posts: 312 Joined: 12/3/2003 From: Louisiana, USA Status: offline
|
RE: history.back and refresh - 6/2/2005 14:29:55
I like to redirect my users back to the page by adding a redirect statement to the end of my update page. The redirect statement sends the user back to the page with the original records list. However, if the original page requires a parameter to pull the records in question, then the parameter must be passed from page to page in order to pull up the desired records. Please reply back if you need help with this. If your page does not require parameters, then your redirect statement would go in the code at the end of your update page: <% Response.Redirect "mypage.asp"%> If you are using the DRW with your update page, you may also need to include the following line at the very top of your page to get the redirect to work: <% Response.Buffer = True %> Hope this helps.
_____________________________
Chris http://www.sightbysite.net
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|