Friday, July 1, 2011

Be careful with form 'onSubmit' method, may cause thread 'race' situation

<form onSubmit="send();return false;">
...
<button onclick='send()'>submit</button>
</form>


where the 'send()' method is a ajax call to certain service, this will result two thread trying to use the service at almost exact same time, hence the the 'race'

No comments:

Post a Comment