SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
-
Apr 28, 2002, 14:13 #1
- Join Date
- Dec 2001
- Posts
- 198
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
preventing the pasting of text in forms
situation : I have a website where users can make their own profile pages and this includes a guestbook. Now some of those users past pretyped messages in all those guestbooks to get some extra attention. This is becoming slightly annoying so I want to add something so that they really have to type their message instead of pasting it.
I dont know exactly what language I would need or how I should solve this, so every suggestion is welcome
-
Apr 28, 2002, 19:55 #2
Well this could at least help prevent those who paste by right-clicking:
No right mouse click script III (no alert) by Renigade (renigade@mediaone.net)
http://www.dynamicdrive.com/dynamicindex9/noright3.htm
Disable right mouse click script by Crash @ http://walk.to/crash
http://www.dynamicdrive.com/dynamicindex11/noright.htmJ. Paul Schmidt
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips
-
Apr 29, 2002, 01:02 #3
- Join Date
- Aug 2001
- Location
- London
- Posts
- 2,475
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
use this
<div onbeforepaste="document.body.focus()"><textarea>adfhadfh</textarea></div>
it will be the best method for canceling paste
theres also these tags which you might want to take into concederation
onbforecut=""
onbforecopy=""
onbforepaste=""
oncut=""
oncopy=""
onpaste=""
hope that helps better than disabling right click, which disables much more functionality
-
Apr 29, 2002, 06:08 #4
- Join Date
- Apr 2002
- Posts
- 54
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
These onbeforepaste/onbeforecut/... events; in which browsers do they work in? Are they IE5 (or 5.5) extensions perhaps? I guess it doesn't really matter much if they are, as you're blocking out 90pc+ of browsers from pasting anyway
.
-
Apr 29, 2002, 14:32 #5
- Join Date
- Aug 2001
- Location
- London
- Posts
- 2,475
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
heres all the event methods, some might be outta date
onabort = netscape 3, 4 - 4.7++, ie 4,5,5.5++
onafterprint = ie 5,5.5++
onafterupdate = ie 4,5,5.5++
onbeforecopy = ie 5,5.5++
onbeforecut = ie 5,5.5++
onbeforepaste = ie 5,5.5++
onbeforeprint = ie 5,5.5++
onbeforeunload= ie5,5.5++
onbeforeupate = ie 4,5,5.5++
onbounce = ie 4,5,5.5++
oncopy = ie 4,5,5.5++
oncut = ie 5,5.5++
ondataavailable=ie 4,5,5.5++
ondatasetchanged=ie 4,5,5.5++
ondatasetcomplete=ie 4,5,5.5++
ondragdrop = netscape 4 - 4.7++
ondragstart = ie 4,5,5.5++
onerror = netscape 4 - 4.7++, ie 4,5,5.5++
onerrorupdate = ie 4,5,5.5++
onfilterchange = ie 4,5,5.5++
onfinish = ie 4,5,5.5++
onhelp = ie 4,5,5.5++
onmove = netscape 4 - 4.7++
onpaste = ie 5,5.5++
onreadystatechange=ie 4,5,5.5++
onresize = netscape 4 - 4.7++, ie 4,5,5.5++
onrowenter = ie 4,5,5.5++
onrowexitr = ie 4,5,5.5++
onscroll = ie 4,5,5.5++
onselectstart = ie 4,5,5.5++
onstart = ie 4,5,5.5++
and i dont think i will be typing that out again lol
-
Apr 30, 2002, 21:24 #6
- Join Date
- Oct 2001
- Location
- Whistler BC originally from Guelph Ontario
- Posts
- 2,175
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
just about all events that don't look normal probably aren't. IE has many that don't work in other browsers
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.
-
Apr 30, 2002, 23:02 #7
- Join Date
- Aug 2001
- Location
- London
- Posts
- 2,475
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hehe how about
onMaelstrom="alert('')"
-
Apr 30, 2002, 23:19 #8
- Join Date
- Oct 2001
- Location
- Tucson, Arizona
- Posts
- 1,858
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Did I mention that I hate this kind of "disabling the user" stuff?
-
Apr 30, 2002, 23:37 #9
- Join Date
- Aug 2001
- Location
- London
- Posts
- 2,475
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Don't we all, no point moaning anymore, for every new web developer a similar question will come along like this.
Is there a complete quide to usability on sitepoint, coz that way every one ouldn't have to answer these usability problems
-
May 1, 2002, 00:16 #10
- Join Date
- Oct 2001
- Location
- Whistler BC originally from Guelph Ontario
- Posts
- 2,175
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Andrew-J2000
Don't we all, no point moaning anymore, for every new web developer a similar question will come along like this.
Is there a complete quide to usability on sitepoint, coz that way every one ouldn't have to answer these usability problemsMaelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.
-
May 6, 2002, 06:11 #11
- Join Date
- May 2002
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How about writing a function that strips all tags of that is if the textarea is a plain one and not the html versions.
Even if it's an html enhanced field only allow certain tags can still be accomplished.
Bookmarks