> The only way I know around this involves leaning on JavaScript to > get the URL, split off the #hash bit from it, and sneak it in as > a hidden element on the login form.
Yeah, I ended up doing this on the /login page. Basically: <script> $(function() { $('#url-hash').attr('value', window.location.hash); }); </script> <form action="..." method="post"> <input type="hidden" id="url-hash" name="url-hash" value="" /> ... </form> This works for firefox. The bigger problem? Internet Explorer does not preserve the hash when following redirects!!! So in this case, you have *no opportunity* to save the hash via javascript on the login page. So instead of sending the 'location' header to redirect, you'd have to send something like this HTML page: <script> window.location = '/login?next=' + escape(window.location); </script> Besides being totally annoying and hackish, it breaks the back button. You can't save the hash with javascript on the login form with IE, because to get to the login form you had to use a redirect, and when you use a redirect the hash is lost... this means the login page never sees the hash in any way when using a redirect. It's amazing that something seemingly simple and fundamental ends up being such a hack. So besides my horrible back-button-breaking hack, does anyone else see a way to do this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---