Hi,
I have a table where i want the users to be able to edit cells by clicking on them. Then they get the usual edit view and after the changes are saved, they are redirected back to the table view. I use this in my template: <td onclick="window.location='/patient/edit/{{patient.id}}/'"> It works for Firefox but unfortunately we use Explorer here and Explorer doesn't work. In the edit view i have a system where i keep track of the referrer so i can redirect the user back to the correct page: page = request.META["HTTP_REFERER"] history[1] = history[0] history[0] = page This is what goes wrong in explorer: the HTTP_REFERER isn't set. With Firefox, the HTTP_REFERER is set. I tried to solve it by using a javascript function in the template that explicitly sets the document.referrer. The td code then looks like this: onclick="edit({{patient.id}})"> The javascript function: {% block extrahead %} <script type="text/javascript"> // Only script specific to this form goes here. // General-purpose routines are in a separate file. function edit(id) { document.referrer=window.location; window.location='/patient/edit/id/' }; </script> {% endblock %} Unfortunately, this doesn't work for both Firefox and Explorer. In Firefox the clicking doesn't work, in Explorer, the click doesn't work and gives an error. (runtime error on the document.referrer=window.location; line) Any idea how i can solve this? Thanks, Benedict --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---