I have a report from which you can choose to edit or delete. When someone chooses to edit a record, I would like to be able to set a cookie from the edit_processor and redirect them back to the report on the same page they started ie: "reportPage_html?query_start=3", and if the cookie is present display a message that the changes have been saved. If I do <dtml-call "RESPONSE.redirect('reportPage_html')"> it returns them to the first page of queries. If I do <dtml-call "RESPONSE.redirect('javascript:history.back()')"> It returns them to the corect page, but the cookie is not read. Does anyone have any ideas how this could be accomplished? Michael
Did you try <dtml-call expr="RESOPNSE.redirect('reportPage_html?query_start=' + str(query_start))"> or something like that? Substitute in what you need for query_start to find the proper variable. Troy Michael wrote:
I have a report from which you can choose to edit or delete. When someone chooses to edit a record, I would like to be able to set a cookie from the edit_processor and redirect them back to the report on the same page they started ie: "reportPage_html?query_start=3", and if the cookie is present display a message that the changes have been saved.
If I do <dtml-call "RESPONSE.redirect('reportPage_html')"> it returns them to the first page of queries. If I do <dtml-call "RESPONSE.redirect('javascript:history.back()')"> It returns them to the corect page, but the cookie is not read.
Does anyone have any ideas how this could be accomplished?
Michael
On Thursday 17 October 2002 02:46 pm, Troy Farrell wrote:
Did you try
<dtml-call expr="RESOPNSE.redirect('reportPage_html?query_start=' + str(query_start))">
Thanks Troy. Between your suggestion and Dylans, I was able to get it working. Michael -- Michael Lewis Nichestaffing.com Web: http://www.nichestaffing.com Email: mlewis@nichestaffing.com Phone: 970-472-1241 Fax: 970-472-8497 "Whatever you can conceive and believe, you can achieve"
What about: <dtml-call "RESPONSE.redirect('reportPage_html?query_start=3')"> Does that get you what you're looking for? You could skip the cookie thing entirely by using something like: <dtml-call "RESPONSE.redirect('reportPage_html?query_start=3&changed=1')"> And then put something like this in reportPage: <dtml-if changed> Record Edited </dtml-if> HTH Dylan At 02:05 PM 10/17/2002 -0600, you wrote:
I have a report from which you can choose to edit or delete. When someone chooses to edit a record, I would like to be able to set a cookie from the edit_processor and redirect them back to the report on the same page they started ie: "reportPage_html?query_start=3", and if the cookie is present display a message that the changes have been saved.
If I do <dtml-call "RESPONSE.redirect('reportPage_html')"> it returns them to the first page of queries. If I do <dtml-call "RESPONSE.redirect('javascript:history.back()')"> It returns them to the corect page, but the cookie is not read.
Does anyone have any ideas how this could be accomplished?
Michael
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thursday 17 October 2002 02:56 pm, Dylan Reinhardt wrote:
What about:
<dtml-call "RESPONSE.redirect('reportPage_html?query_start=3')">
Does that get you what you're looking for?
yes but "query_start=3" will need to ba a variable. If I hard code it it will work fine, but only in that one instance. What I need is something similar to <a href="reportPage.htm#target"> with target being a variable that can be called. The only problem with that is I can't use a <dtml-var xxxx> inside a <dtml-var xxx>
You could skip the cookie thing entirely by using something like:
<dtml-call "RESPONSE.redirect('reportPage_html?query_start=3&changed=1')">
And then put something like this in reportPage:
<dtml-if changed> Record Edited </dtml-if>
HTH
Dylan
At 02:05 PM 10/17/2002 -0600, you wrote:
I have a report from which you can choose to edit or delete. When someone chooses to edit a record, I would like to be able to set a cookie from the edit_processor and redirect them back to the report on the same page they started ie: "reportPage_html?query_start=3", and if the cookie is present display a message that the changes have been saved.
If I do <dtml-call "RESPONSE.redirect('reportPage_html')"> it returns them to the first page of queries. If I do <dtml-call "RESPONSE.redirect('javascript:history.back()')"> It returns them to the corect page, but the cookie is not read.
Does anyone have any ideas how this could be accomplished?
Michael
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Michael Lewis Nichestaffing.com Web: http://www.nichestaffing.com Email: mlewis@nichestaffing.com Phone: 970-472-1241 Fax: 970-472-8497 "Whatever you can conceive and believe, you can achieve"
At 02:48 PM 10/17/2002 -0600, you wrote:
yes but "query_start=3" will need to ba a variable.
Fine. So: <dtml-call "RESPONSE.redirect('reportPage_html?'+SOME_VAR)"> Then all you need to do is make sure the calling page has been passed a value for SOME_VAR Dylan
On Thursday 17 October 2002 03:34 pm, Dylan Reinhardt wrote:
Fine. So:
<dtml-call "RESPONSE.redirect('reportPage_html?'+SOME_VAR)">
Then all you need to do is make sure the calling page has been passed a value for SOME_VAR
Dylan
Okay, on my report I did the following: <dtml-let start_number="_['next-sequence-start-number']-10"> <dtml-call "RESPONSE.setCookie('start_number',start_number,path='/')"> </dtml-let> This gives me the proper start number for the page. Then on my processor I did: <dtml-call expr="RESPONSE.redirect('reportPage_html?query_start='+start_number)"> I think my solution is kind of convoluted, but it works! Thanks for pointing me in the right direction. Michael -- Michael Lewis Nichestaffing.com Web: http://www.nichestaffing.com Email: mlewis@nichestaffing.com Phone: 970-472-1241 Fax: 970-472-8497 "Whatever you can conceive and believe, you can achieve"
participants (4)
-
Dylan Reinhardt -
Dylan Reinhardt -
Michael -
Troy Farrell