Well, the test server has not completely been rebuilt, so I have to move on. On the production server, I attempted to install the needed Perl modules and ran into several snags. Some of them won't compile.
So, I need to back up a bit. I hate having to learn a language on the fly, but it won't be the first time. The procedure that I have is written in Perl, and so I need to write it in PHP.
If you don't know what PHP is, it is a scripting language to generate dynamic web pages, with its interpreter written in C++. It originally stood for Personal Home Page, but has moved away from that. A lot of the syntax is similar to C++, so it should not be too hard, right?
So, I'm looking for the right
"...Dummies" book to give me what I need -- PHP and SOAP messages over SSL. If you know of any, please comment. Anyway, I'll most likely have to pick and choose from the Internet, like always. :-/
For example, I've written some JavaScript code to allow tab key input into a text field for forms, taken from here and there on the 'net. Found one code, that didn't work correctly, but I took that and ran with it (I don't remember who I got it from, so if it was you, sorry and let me know). Fixed it and it works great! The tab character is inserted into the text at the current cursor position.
The only problem is, the code that I have only works in IE. Since that is the accepted browser where I work, there is no immediate need to go further, but I would like more.
Here is the code:
<script language="JavaScript">
<!--
function storeCaret(textEl) {
if (textEl.createTextRange)
textEl.caretPos = document.selection.createRange().duplicate();
}
function insertAtCaret(textEl, text) {
if (textEl.createTextRange && textEl.caretPos) {
var caretPos = textEl.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
}
else
textEl.value = text;
}
function onKeyDown(textE2) {
var e = window.event;
storeCaret(textE2);
if (e.keyCode == 9) { // tab
insertAtCaret(textE2, "\t")
e.returnValue = false;
}
return true;
}
// -->
</script>
And all you have to do to get it to work is use the
onKeydown="onKeyDown(this);" event handler on the text area you want to use it in.
If you know how to make this work in Netscape, let me know and I promise I will give you credit!!
PS. If you would like me to make the code available online, I'll figure something out (just tried to cut-n-paste and that sucked).
PPS. The limited control over text spacing here sux!