You are here: Re: Refresh/Double Submit problem « PHP Programming Language « IT news, forums, messages
Re: Refresh/Double Submit problem

Posted by Jerry Stuckle on 05/09/07 22:47

ABC wrote:
> On May 7, 7:26 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> ABC wrote:
>>> Hi,
>>> I have a problem with Double submission in html forms.
>>> I am using PHP as the server side scripting language, i have found a
>>> means to capture the second form submission while the first form
>>> submission is still in-progress. Basically, i can use sessions to
>>> check if the first submission is active and reject subsequent submits.
>>> ***I do not want to try any client side solution(such as disabling
>>> submit button) as hitting F5 on the screen will re-post the data
>>> again.
>>> My question is :
>>> (*) if i send some kind of output to the browser telling the user
>>> that a previous session is active, then how do i ensure that the first
>>> form submission's output is displayed to the user on the browser
>>> window?
>>> I tried, print messages like- Please wait. But somehow the first form
>>> submission's output is not printed...I am guessing the browser closes
>>> the connection after the second submission's output is received and
>>> first submission has no where to send the output.
>>> I hope, i have been able to express my problem clearly.
>>> Please help!
>>> Raghu
>> Hmmm, let's see.
>>
>> How about the page you're posting to outputs a "Please wait" and flushes
>> the output, then starts processing. Might not work in all browsers -
>> but in most it should clear the screen and give the "please wait" message.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================- Hide quoted text -
>>
>> - Show quoted text -
>
> Hi Thanks for your help so far,
>
> I have heard the struts framework supports Synchronizer token pattern
> to handle this kind of problem.
> But didnt understand it well. I suppose this is a common problem
> encountered..
>
> Do let me know your thoughts on this...
>

Sorry, I've never used it. But I suspect it does something similar.

Any way you go, you have to follow what the protocol, server and client
do. No framework can bypass that.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация