Complex question, are you up to it?
Complex question, are you up to it?
(OP)
Just joined so I could ask this tough question. I work for a company and we use Zope. Problem with Zope is no IDE, you have to use a browser to access it. I'm trying to design a program in VB6 to speed up typing certain things.
Now the problem:
If you select text in a TextArea in the browser (IE, Mozilla, or Netscape) I'm trying to find a way to grab that selected text. As of right now I'll end up using keybd_event to send information so it gets inserted into that TextArea, and the clipboard (making a person copy the selected text there first) to get the selected text. If anyone knows a way to grab the selected text from the TextArea and possibly even write to the TextArea at the current cursor position I would really love to know.
I've searched the net and can't find anything online to help me at all.
Thanks in advance to anyone who responds!
Now the problem:
If you select text in a TextArea in the browser (IE, Mozilla, or Netscape) I'm trying to find a way to grab that selected text. As of right now I'll end up using keybd_event to send information so it gets inserted into that TextArea, and the clipboard (making a person copy the selected text there first) to get the selected text. If anyone knows a way to grab the selected text from the TextArea and possibly even write to the TextArea at the current cursor position I would really love to know.
I've searched the net and can't find anything online to help me at all.
Thanks in advance to anyone who responds!





RE: Complex question, are you up to it?
RE: Complex question, are you up to it?
It's an idea, but it wouldn't work because of how Zope works. Say you have a page index_html, to edit that in Zope you point a browser to the management of that page. The text in the TextArea where you are typing (adding and changing code) doesn't save the page until you tell it to. So if you tried to grab the page that way you'd get the code as of the last save. I need something that can get into the browser, into that TextArea and work in there.
Thanks for trying though.
RE: Complex question, are you up to it?
RE: Complex question, are you up to it?
from textarea (HTML page). Also there are a lot of scripts on the net regarding TEXTAREA.
***************************************************
The following script allows you to select text on a web page and then copy it into a text box.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function copyit(theField) {
var selectedText = document.selection;
if (selectedText.type == 'Text') {
var newRange = selectedText.createRange();
theField.focus();
theField.value = newRange.text;
} else {
alert('select a text in the page and then press this button');
}
}
</script>
</HEAD>
<BODY>
<form name="it">
<div align="center">
<input onclick="copyit(this.form.select1)" type="button" value="Press to copy the highlighted text" name="btnCopy">
<p>
<textarea name="select1" rows="4" cols="45"></textarea>
</div>
</form>
</body>
************************************ OR
//Grab form field text
<HEAD>
<SCRIPT LANGUAGE='JavaScript'>
<!--
function aceGrabText(fieldName){
fieldName.focus();
fieldName.select();
}
-->
</SCRIPT>
</HEAD>
<BODY>
<A href="javascript:aceGrabText(document.form1.field1)">Click to Select</A>
<FORM name="form1">
<textarea rows="12" cols="62" name="field1">Text goes here.</textarea>
</FORM>
</BODY
RE: Complex question, are you up to it?
But the folowing site may help also.
IE Editor for Zope
http://vsbabu.org/webdev/zopedev/ieeditor.html