[eluser]wovenlander[/eluser]
[quote author="mihu" date="1228518626"]will current_url() works?
I got similar issue.
I need to use javascript to direct request to a processing step and redirect back to original place.
Could someone guide me how I can get this done?[/quote]
Javascript already knows the current URL, it's at
[removed].href
Assign that to a hidden field in your form, or append it to your query string, so it'll go to the server when the form is submitted; and then your controller can redirect back to it.
Try writing a little Javascript that outputs the location.href into the current page once it's loaded. That way you can see if you're getting the value you need to send them back.
One thing: you generally want to HTMLencode the current URL for transmission in a GET or POST, and then decode it when you want to use it in a redirect.