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

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


Reply

1058 Views

Avatar
katja

16 March 2011 at 8:13am (Last edited: 17 March 2011 12:27am), Community Member, 46 Posts

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