Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: how to forbidden mouse click and keyboard typing and refresh page when loading page after press submit button in form Date: Fri, 10 Jun 2016 10:21:59 +0100 Organization: A noiseless patient Spider Lines: 28 Message-ID: <8737ol7614.fsf@bsb.me.uk> References: <791fbcd1-83b1-4fc2-84b0-efa7ef6b6c01@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="29758"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RSwdwGQxOcrLYJJ5ws6NXOeGLsnAQNIE=" Cancel-Lock: sha1:9e0td2AMDMF2SnBKXgFPQTqZI34= sha1:We4fYaqRcHIq/GI0lpi6HiwgD38= X-BSB-Auth: 1.265fb40ed522d716057f.20160610102159BST.8737ol7614.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:30650 meInvent bbird writes: > 1. how to forbidden mouse click and keyboard typing when loading page > after press submit button in django web > > 2. how to forbidden refresh page in django during loading after press > submit button in form and only allow close window You can't forbid anything using client-side scripting. > 3. which regex are for filtering malicious input in django? You should not use client-side scripting for this purpose. Any method you use in the client to screen out bad input can be circumvented but a malicious user. A check in the client can be helpful to the user, because it can give very rapid feedback out malformed data, but it can't be relied on to ensure only valid input is sent to the server. > i just afraid user crazily press refresh button multiple times or ctr > + r multiple time during page loading You have to ensure that this is harmless. The server code must be designed so that it is unaffected by multiple submissions or reloads. In short, this is not really a comp.lang.javascript question. -- Ben.