Searched through SO but solutions involves redirects, which I cannot do (because I need to keep the submitted form values for the action intact).
Now I have this action.
/**
* @Template()
*/
public function someAction() {
// ...
return array(
'param' => $whatever,
'anchor' => 'someAnchor'
);
}
How do you let this action go to someAnchor directly, i.e. instead of going to http://example.com/some/route/some, it goes to http://example.com/some/route/some#someAnchor ?
Going to particular anchor can be done through
1) HTTP header – Location
2) Anchor tag
2) JavaScript
For your case, you are left with last option.
Sol
After page load, change the URL with anchor.