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.

Form Questions /

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

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

Go to End



Community Member, 46 Posts

16 March 2011 at 8:13am

Edited: 17/03/2011 12:27am


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?