Псих
Поясняю. Мне нужен первый толчок: как получить в моем скрипте или объекте ActivX объект документа?
На этот вопрос ответ будет? Или закрываем тему? =)
Всем спасибо, все свободны =)
Скрипт, что-то а-ля это:
Код:
<SCRIPT LANGUAGE = "JavaScript">
// Get the window object where the context menu was opened.
var oWindow = window.external.menuArguments;
// Get the document object exposed through oWindow.
var oDocument = oWindow.document;
// Get the selection from oDocument.
// in oDocument.
var oSelect = oDocument.selection;
// Create a TextRange from oSelect.
var oSelectRange = oSelect.createRange();
// Get the text of the selection.
var sNewText = oSelectRange.text;
// If nothing was selected, insert some text.
if (sNewText.length == 0){
oSelectRange.text = "INSERT TEXT";
}
// Otherwise, convert the selection to uppercase.
else{
oSelectRange.text = sNewText.toUpperCase();
}
</SCRIPT>
Все-таки нашел в себе силы разобраться в MSDN, хотя с непривычки трудно.
Правда, всем спасибо, тему закрываем =)