Hallo!
Vielmehr interessiert mich, wie das programmtechnisch
umgesetzt wird, dass der „Mr.Check“ das per Maus markierte
Wort erkennt?!? Ich meine, wie werden die Daten „das Wort
‚XYZ‘“ ist markiert an „Mr. Check“ übertragen?
Schon mal auf die Idee gekommen, einfach in den Source reinzuschauen?
// $Id: werweisswas.js,v 1.1 2000/09/06 17:30:39 thomas Exp $
// xipolis.net GmbH & Co. KG
// Klick & Search with Mr. Check - a xipolis.net-Feature
// maintained by Thomas Nitsche
// Copyright (c) 2000 by xipolis.net
// use:
//
// This is a generated file! Do not edit.
var mrCheckPattern = "";
var mrCheckUrl = "http://mr-check.xipolis.net/Mrcheck.php";
var mrCheckClient = "werweisswas";
var mrCheckClientLogo = "/images/menu/mrcheck\_xt.gif";
var mrCheckClientLogoProps = 'width="63" height="67"';
var mrCheckTitle = "mrCheckAtWerweisswas";
var mrCheckWin;
var mrCheckWhitespace = new RegExp('([\\n\\t\\v\\r\\f]|%0D|%0A|%20)+', 'g');
var mrCheckCheck = 0;
if ((navigator.appName == "Microsoft Internet Explorer")
&& parseInt(navigator.appVersion) \>= 4) {
mrCheckCheck = 2;
document.write ('');
}
if ((navigator.appName == "Netscape")
&& parseInt(navigator.appVersion) \>= 4) {
mrCheckCheck = 1;
document.write ('');
}
und dann weiter:
// $Id: defNetscape.js,v 1.3 2000/09/12 14:58:36 thomas Exp $
// xipolis.net GmbH & Co. KG
// Klick & Search with Mr. Check - a xipolis.net-Feature
// maintained by Thomas Nitsche
// Copyright (c) 2000 by xipolis.net
// parse all browser windows for a text selection.
function mrCheckFindSelection (w)
{
var pattern;
var store;
pattern = escape(w.document.getSelection());
pattern = pattern.replace(mrCheckWhitespace,"%20");
if (pattern) store = pattern;
for (var i=0; i 0) {
window.top.status = 'Hier klicken, um den Begriff "' + unescape(mrCheckPattern) + '" zu erklären.';
} else {
window.top.status = 'Mr. Check ist bereit.';
}
return true;
}
// onMouseOut-Message
function mrCheckOnOut() {
window.top.status = "Mr. Check ist bereit.";
return true;
}
// run Query against Database and start a new window
function mrCheckStartQuery()
{
if (mrCheckPattern.length \> 0) {
url = mrCheckUrl + '?SP=' + mrCheckPattern + '&CL=' + mrCheckClient;
if (!mrCheckWin || mrCheckWin.closed){
if (mrCheckCheck==1)
// mrCheckWin = window.open (url,mrCheckTitle,'width=270,height=320,screenX='+(screen.width-270-10)+',screenY='+(screen.height-320-70)+',directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
mrCheckWin = window.open (url,mrCheckTitle,'width=270,height=320,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
else
if (mrCheckCheck==2)
// mrCheckWin = window.open (url,mrCheckTitle,'width=270,height=320,left='+(screen.width-270-10)+',top='+(screen.height-320-70)+',directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
mrCheckWin = window.open (url,mrCheckTitle,'width=270,height=320,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
}
else {
mrCheckWin.location.href = url;
}
if(mrCheckWin) {
mrCheckWin.focus();
}
} else {
alert ("Sie m"+"\u00FC"+"ssen zuerst ein Wort markieren und\nanschlie"+"\u00DF"+"end den Mr.-Check-Button anklicken.\nWeitere Infos unter www.mrcheck.de");
}
return false;
}
// Print mrCheck-Button
if (mrCheckCheck==1) {
document.write ('');
}
bzw. die M$-Variante (wer’s braucht…) :
// $Id: defMicrosoft.js,v 1.1 2000/08/09 11:30:57 thomas Exp $
// xipolis.net GmbH & Co. KG
// Klick & Search with Mr. Check - a xipolis.net-Feature
// maintained by Thomas Nitsche
// Copyright (c) 2000 by xipolis.net
// spezielles Microsoft Internet Explorer Script mit try {...} catch ();
// ACHTUNG: nicht fuer Netscape geeignet.
function mrCheckFindSelection (w)
{
var pattern;
var TextRange;
try{
if (navigator.platform=="MacPPC"){
pattern=w.document.getSelection();
}else{
TextRange = w.document.selection.createRange();
pattern = TextRange.text;
}
if (pattern) {
return (pattern);
}
}catch(e){
pattern = "";
}
for (var i=0; i');
}
Ich dachte eigentlich, das wäre die Methode, wie mensch heute lernt: Read the source, Luke!
Viel Spaß damit,
Stefan 