I got a problem, which I am unable to solve by myself.
I followed tutorials and asked some people that know quite a lot about javascript.
They couldn't help me, sadly enough.
I tried several things, they are prefixed with #1 and #2. To make clear which attempt is which code.
Header:
<script language="javascript"> <!-- function highlight(area){ document.form_code(area).focus() document.form_code(area).select() } --> </script>
Script:
<script type="text/javascript"> <!-- function getSelText() { var txt = ''; var foundIn = ''; if (window.getSelection) { txt = window.getSelection(); } else if (document.getSelection) { txt = document.getSelection(); } else if (document.selection) { txt = document.selection.createRange().text; } else return; #1 s = document.aform.selectedtext.value; #1 document.write(s); #1 s = s.replace(/Chr(9)/g,"\r"); #1 document.aform.selectedtext.value = s; #2 document.aform.selectedtext.value = replace(document.aform.selectedtext.value, /Chr(9)/, "\r") document.aform.selectedtext.value = document.aform.selectedtext.value + "\r" + txt; } // --> </script>
The code without prefix numbers is a working piece of code.
If you need more information about the script before you can help me, feel free to PM or, if possible, mail me.