Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30649 > unrolled thread
| Started by | meInvent bbird <jobmattcon@gmail.com> |
|---|---|
| First post | 2016-06-10 00:26 -0700 |
| Last post | 2016-06-10 11:32 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.javascript
how to forbidden mouse click and keyboard typing and refresh page when loading page after press submit button in form meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 00:26 -0700
Re: how to forbidden mouse click and keyboard typing and refresh page when loading page after press submit button in form Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-06-10 10:21 +0100
Re: how to forbidden mouse click and keyboard typing and refresh page when loading page after press submit button in form Erwin Moller <erwinmollerusenet@xs4all.nl> - 2016-06-10 11:32 +0200
| From | meInvent bbird <jobmattcon@gmail.com> |
|---|---|
| Date | 2016-06-10 00:26 -0700 |
| Subject | how to forbidden mouse click and keyboard typing and refresh page when loading page after press submit button in form |
| Message-ID | <791fbcd1-83b1-4fc2-84b0-efa7ef6b6c01@googlegroups.com> |
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 3. which regex are for filtering malicious input in django? i just afraid user crazily press refresh button multiple times or ctr + r multiple time during page loading
[toc] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-06-10 10:21 +0100 |
| Message-ID | <8737ol7614.fsf@bsb.me.uk> |
| In reply to | #30649 |
meInvent bbird <jobmattcon@gmail.com> 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.
[toc] | [prev] | [next] | [standalone]
| From | Erwin Moller <erwinmollerusenet@xs4all.nl> |
|---|---|
| Date | 2016-06-10 11:32 +0200 |
| Message-ID | <575a893b$0$5930$e4fe514c@news.xs4all.nl> |
| In reply to | #30649 |
On 6/10/2016 9:26 AM, meInvent bbird wrote: > 1. how to forbidden mouse click and keyboard typing when loading page after press submit button in django web Once you clicked the submit, the request is on its way to the server. Your browser waits for the response. What the user does in the meantime (and how the browser handles it) won't stop the posted request to the server. You can catch the mouse and keyboard events in the document if you want. Just attach an eventlistener for all mouse events and keyboard events you want to catch, and make sure they don't propagate. for example: keypress keydown events for keyboard mousedown click etc for mouse. Also look up: e.stopPropogation and e.preventDefault > > 2. how to forbidden refresh page in django during loading after press submit button in form and only allow close window I don't think you can avoid that. I also fail to see why you WANT to forbid that. > > 3. which regex are for filtering malicious input in django? > None. There isn't a magic regular expression that filters "all bad stuff" out, because "bad" depends on the usage. You have to think about SQL-injection, cross site scripting, etc, etc. What is OK in one situation, is not in the next. So do it right, and handle all situations appropriately. > i just afraid user crazily press refresh button multiple times or ctr + r multiple time during page loading > Why are you afraid of that? Why care? Regards, Erwin Moller -- "That which can be asserted without evidence, can be dismissed without evidence." -- Christopher Hitchens
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web