I've tried searching the web but I've had little success finding a
cross-browser(IE, Firefox and Opera anyway) implementation of a
restricted text INPUT that works in realtime before a character is even
displayed in the field. Is there a working implementation anywhere?
And how about denial of cross-browser pasting? On Windows a popup menu
appears with the clipboard pasting options and I'd like to disable that
and CTRL-V in an INPUT too. 1 2035
Rancid Buttchutney wrote:
I've tried searching the web but I've had little success finding a
cross-browser(IE, Firefox and Opera anyway) implementation of a
restricted text INPUT that works in realtime before a character is even
displayed in the field. Is there a working implementation anywhere?
The HTML maxlength attribute is pretty robust. There are many scripts
availble, search the archives of this news group. They are of limited
use as they only work if scripting is enabled - which probably creates
more issues than cross-browser compatability.
If you want to stop something from being displayed, you have to use the
keydown event to see which key(s) have been pressed and work out
whether to cancel the event or allow it to proceed. That logic can
become extensive, as once you have reached your maximum number of
characters you still want to allow key strokes like delete, backspace,
cursor keys, etc.
Users can also select multiple characters and enter a single character
to replace them, hence the use of keyup or keypress events to see what
the user actually did before trying to modify their behaviour.
Therefore most scripts wait until the user has finished entering text
before trying to validate it.
A good solution is to use an on-screen message based on keypress to
advise of invalid input rather than trying to modify the input's value.
The message appears when invalid input is detected, then disappears
when it is fixed. It keeps the user in control and doesn't try to
force them into any particular behaviour - how they achieve valid input
is totally up to them. The value of an input only has to be valid
*when the form is submitted*, not at some random point in time before
then.
And how about denial of cross-browser pasting? On Windows a popup menu
appears with the clipboard pasting options and I'd like to disable that
and CTRL-V in an INPUT too.
Impossible to do reliably in even a few browsers, much less all.
--
Rob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Web Science |
last post by:
Site and Features: http://www.eigensearch.com
Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools
Chemistry, mathematics, physical sciences,...
|
by: * ProteanThread * |
last post by:
but depends upon the clique:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=954drf%24oca%241%40agate.berkeley.edu&rnum=2&prev=/groups%3Fq%3D%2522cross%2Bposting%2Bversus%2Bmulti%2Bposting%2522%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
...
|
by: Web Science |
last post by:
Site and Features: http://www.eigensearch.com
Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools
Chemistry, mathematics, physical sciences,...
|
by: David Peach |
last post by:
Hello, hope somebody here can help me... I have a query that lists
defects recorded in a user defined date range. That query is then used
as the source for a Cross Tab query that cross-tabs count of defect
type by calendar month. Defect types are stored in one table, defect
transactions in another along with date etc. When I cross-tab the
results, defect types that have no defects recorded against them
appear as a blank (null) value. That...
|
by: Jeff Rodriguez |
last post by:
Here's what I want do:
Have a main daemon which starts up several threads in a Boss-Queue structure.
From those threads, I want them all to sit and watch a queue. Once an entry
goes into the queue, grab it and run a system command.
Now I want to make sure that system command doesn't hang forever, so I need some
way to kill the command and have the worker thread go back to work waiting for
another queue entry.
| |
by: Web Science |
last post by:
Site and Features: http://www.eigensearch.com
Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools
Chemistry, mathematics, physical sciences,...
|
by: Scott M. |
last post by:
How can I disable the cross-site scripting check for one particular page of
a site?
|
by: Pieter |
last post by:
Hi,
I'm having some weird problem using the BackGroundWorker in an Outlook
(2003) Add-In, with VB.NET 2005:
I'm using the BackGroundWorker to get the info of some mailitems, and after
each item I want to raise the ProgressChanged-event to update the
DataGridView.
It works fine when only one Progresschanged is fired, but at the second,
third, fopurth etc it raises everytile a 'Cross-thread operation not
valid"-exception on lmy...
|
by: jlamanna |
last post by:
I was wondering if there was a utility that could tell you when your C#
application is making cross-apartment COM calls. I have a fairly large
application that makes extensive use of a 3rd party object system that
is exposed to .NET through COM, and I'm really trying to avoid slow
cross-apartment calls.
Also, is using Invoke() on a class created from the main thread a
solution to making COM calls into that thread?
Thanks.
|
by: Rob Woodworth |
last post by:
Hi,
I'm having serious problems getting my report to work. I need to
generate a timesheet report which will contain info for one employee between
certain dates (one week's worth of dates). I have a table containing
records for each job done, the records contain date, employee name, job done
(a code representing the type of job), cost code (another code), regular
hours, and overtime hours. The tricky part is that more than one job can...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |