// code for IE var textarea = document.getElementById("textarea"); if (document.selection) { textarea.focus(); var sel = document.selection.createRange(); // alert the selected text in textarea alert(sel.text); // Finally replace the value of the selected text // with this new replacement one sel.text = '' + sel.text + ''; } // code for Mozilla var textarea = document.getElementById("textarea"); var len = textarea.value.length; var start = textarea.selectionStart; var end = textarea.selectionEnd; var sel = textarea.value.substring(start, end); // This is the selected text and alert it alert(sel); var replace = '' + sel + ''; // Here we are replacing the selected text with this one textarea.value = textarea.value.substring(0,start) + replace + textarea.value.substring(end,len);
Thursday, August 19, 2010
How to replace selected textarea value using javascript
Sunday, August 1, 2010
Repository Has Not Been Enabled To Accept Revision Propchanges
Solution
To correct this, I needed to create a file in the "hooks" folder of my Subversion repository. On my system, it was located at C:\svn\repository\hooks. I created a file called "pre-revprop-change.bat", and I set the contents to this:
rem Only allow log messages to be changed.
if "%4" == "svn:log" exit 0
echo Property '%4' cannot be changed >&2
exit 1
This solution was suggested in the TortoiseSVN documentation.
Subscribe to:
Posts (Atom)
5 Strategies for Getting More Work Done in Less Time
Summary. You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...

-
Imagine going to work everyday and facing a colleague who does not respect you or having to work with someone who was constantly underminin...
-
Sometimes just to get a quick success build you might need to disable/ignore/skip some of the munit test cases. you can do you by double ...
-
Some times you might need to return static response from nginx. for example validating file upload limit error_page 413 @413_x...