MSIE desperate Measures
Hi all, We are encountering heavy problems trying to get MSIE to work properly with Zope. (No, we don't like MSIE either, but we've got to get this working for a client.) We've set up a form (with Formulator) which should send data to a script once. But MSIE 6 (with spack 1 applied) does more than that ... MSIE sends the POST-Request from the form at least twice, sometimes even 3 to 4 times. Sniffing with Ethereal confirmed this weird behaviour (at least 2 Posts from MSIE, 1 Response from Zope). The Problem is that the form-action-object (in our case a python-script) gets triggered 2-3 times as well, which is definitely *not* what we want. (This is how we first noticed the problem, the script sent 3 mails instead of one) Any help would be more than appreciated. Regards, Michael -- ******************************** Michael Geddert Arche Netvision GmbH Banter Deich 18 26382 Wilhelmshaven Tel.: 04421-916351 Fax: 04421-916444 Url: www.arche.ag ********************************
Is using a session variable an option? I would set a session variable the first time the response is given, and test for it before responding at all. Logic like: if session_var == 1: pass else: do_somthing() session_var = 1 Given the odd behavior from MSIE, I hope that sessions are working :) Troy Michael Geddert wrote:
Hi all,
We are encountering heavy problems trying to get MSIE to work properly with Zope. (No, we don't like MSIE either, but we've got to get this working for a client.)
We've set up a form (with Formulator) which should send data to a script once. But MSIE 6 (with spack 1 applied) does more than that ... MSIE sends the POST-Request from the form at least twice, sometimes even 3 to 4 times. Sniffing with Ethereal confirmed this weird behaviour (at least 2 Posts from MSIE, 1 Response from Zope).
The Problem is that the form-action-object (in our case a python-script) gets triggered 2-3 times as well, which is definitely *not* what we want. (This is how we first noticed the problem, the script sent 3 mails instead of one)
Any help would be more than appreciated.
Regards,
Michael
On Wednesday 14 May 2003 06:12 am, Michael Geddert wrote:
We are encountering heavy problems trying to get MSIE to work properly
The Problem is that the form-action-object (in our case a python-script) gets triggered 2-3 times as well, which is definitely *not* what we want. (This is how we first noticed the problem, the script sent 3 mails instead of one)
Even if the browser were to work correctly, you'd probably get this behavior occasionally from users (in a network slowdown, the user might click "submit" multiple times). So, the best thing is probably to build for it. How about embedding a random id into each form with an <inputr type="hidden" name="form_id" value="&dtml-randomkey;"> and generate a random value for 'randomkey'. Then check for multiple replies with same id in the script you use to catch the data (means you'll have to cache the ids somewhere). Just an idea -- not sure how hard or easy it'd be in your case. Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Hi, We solved the issue the way you suggested. Thanks a lot for the hint ! BTW: Sessions seem to be affected by that MSIE "feature" as well, we were not able to get a solution based on session-vars to work properly... Thanks again, Michael Terry Hancock wrote: <snip>
The Problem is that the form-action-object (in our case a python-script) gets triggered 2-3 times as well, which is definitely *not* what we want. (This is how we first noticed the problem, the script sent 3 mails instead of one)
Even if the browser were to work correctly, you'd probably get this behavior occasionally from users (in a network slowdown, the user might click "submit" multiple times). So, the best thing is probably to build for it.
How about embedding a random id into each form with an
<inputr type="hidden" name="form_id" value="&dtml-randomkey;">
and generate a random value for 'randomkey'.
Then check for multiple replies with same id in the script you use to catch the data (means you'll have to cache the ids somewhere).
</snip>
I'm curious, where did you cache the random id? Troy Michael Geddert wrote:
Hi,
We solved the issue the way you suggested. Thanks a lot for the hint ! BTW: Sessions seem to be affected by that MSIE "feature" as well, we were not able to get a solution based on session-vars to work properly...
Thanks again,
Michael
Terry Hancock wrote: <snip>
The Problem is that the form-action-object (in our case a python-script) gets triggered 2-3 times as well, which is definitely *not* what we want. (This is how we first noticed the problem, the script sent 3 mails instead of one)
Even if the browser were to work correctly, you'd probably get this behavior occasionally from users (in a network slowdown, the user might click "submit" multiple times). So, the best thing is probably to build for it.
How about embedding a random id into each form with an <inputr type="hidden" name="form_id" value="&dtml-randomkey;">
and generate a random value for 'randomkey'.
Then check for multiple replies with same id in the script you use to catch the data (means you'll have to cache the ids somewhere).
</snip>
Hello, As Sessions weren't working reliably for us, we stored all random IDs via MySQL. Now MySQL takes care of data consistency, and MSIE may trigger Zope 3-4 times per request if it feels like it ;) Thanks again for your help, Regards, Michael Troy Farrell wrote:
I'm curious, where did you cache the random id?
Troy
participants (4)
-
Michael Geddert -
Michael Geddert -
Terry Hancock -
Troy Farrell