About This Code
Brief Description:
Double-Click a web page to edit it
Contributor:
Andrew Jones
Last Modified:
17 Jun 2002
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
Usage / Example
This will be one of those things your users will either love or hate.
Put the following in the onDblClick event of a form and when the user double clicks anywhere in the page they will go into edit mode.
location.search='?EditDocument'
Note: This may annoy people who aren't aware of what they are doing or who expected double click to highlight the word they were clicking on.
Also, you may need to do a replace in the URL of "Open" with "Edit" if it contains any arguments after the document part. eg:
"...7a0fwe9?OpenDocument&name=Jake&town=here"
as the above method would lose these ;-(
Don't forget to check that the .search attribute of the URL is not already '?EditDocument' !!
Comments
Posted by Jake Howlett on 07/24/2003 05:49:38 AMVerbatim rip off
This is a word for word copy of a tip I published on codestore.net years ago.
Jake