How to disable the submit button in opera mini to prevent multiple submissions of a form
Because Opera mini only fires button events on Opera's servers when a form is finally submitted, I am having trouble preventing users from multiclicking the submit button. This results in multiple submissions of the same form. I could prevent this server-side, but is the开发者_开发技巧re any way to prevent this on the opera mini client (i.e. via javascript)?
Essentially,
- The user is clicking submit
- Before the form is processed and any javascript attempting to prevent multiple submission is executed on Opera's servers, the user is clicking submit again.
I really doubt it, and say no, because Opera says on their dev site that they don't support client side JavaScript after the page is loaded.
There are a few more caveats specific to Opera Mini 5 that developers need to be aware of: The majority of JavaScript that is triggered onload should work just fine, except in cases where those scripts require asynchronous operations. JavaScript won't run client-side (for instance in response to user interaction) once the page has finished loading. Plug-ins, such as Adobe Flash, are not supported.
Source: Opera Mini 5 specs
So unfortunately, server side checking is the best thing to do. If it's that important then it's good that you do it server side, because this can happen on any browser client.
Still, Opera Mini does support other Javascript actions, but they all get executed on the server.
精彩评论