Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Director::redirect('page#anchor') - IE ignores everything from hash on


Go to End


1698 Views

Avatar
katja

Community Member, 46 Posts

16 March 2011 at 8:13am

Edited: 17/03/2011 12:27am

Hello,

This is not directly part of forms, but as the redirect is most often used in conjunction with forms I guess, I will put it here.

I have added something like Director::redirect('page#anchor') at the end of a form action, and when I submit the form in Internet Explorer it just totally ignores the # and everything after it (It gets deleted in the URL in the browser's address line as well). If I just have a link with a # in it, that works fine in IE. It happens only when I use Director::redirect().

Does anybody have an explanation what is happening there, and how I could go round this problem?

Thanks,
Katja