NetTalk Central

Author Topic: Cancel Button - URL on cancel  (Read 3019 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Cancel Button - URL on cancel
« on: August 07, 2012, 09:18:36 AM »

Hi,


How do I get the Cancel Button to always go back to the previous screen?
I know you don't actually go 'back', but keep moving 'forward', but I am trying move forward to the previous procedure.

I have some code that saves the parent URL using p_web.RequestReferer,
but this runs into problems as the Form goes through it's stages.

Was wondering if there was a magic way to do this?

thanks

Johan


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Cancel Button - URL on cancel
« Reply #1 on: August 07, 2012, 07:14:57 PM »
I think if you leave the URL on Cancel in the template blank it will go back to where it came from. The other technique I use if I'm calling the same form from different places is to set a session value of the form to return to and then use this on the template in URL on Cancel.

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Cancel Button - URL on cancel
« Reply #2 on: August 07, 2012, 11:43:32 PM »

Hi Kevin

Thanks for your reply.
Leaving it blank defaults to the URL that was specified in the Save button.

I will use my code and save it in a session variable,
it get's a little tricky as there could be more than one tab open on the same session as I understand it.


thanks

Johan