Autor Beitrag
Doc Morelli
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: So 15.08.04 18:59 
Hallo,

also, ich habe folgendes Problem: Ich wollte mir einen kleinen HTTPServer programmieren. Aber wenn ich jetzt einen Link auf der Seite anklicke, dann wird nicht die neue Seite geladen, sondern keine. Das Beispiel von den Indykomponenten hierzu habe ich mir schon angesehen, aber bei dem Beispiel blicke ich einfach nicht ganz durch. Folgendes habe ich eingestellt:

Bindings: 0.0.0.0:80
Active: True
Reply Texts:
Text: Text einer HTML-Seite
TextCode: text/html


Das alles im Objektinspektor. Würde mich freuen, wenn mir jemand sagen könnte, was ich falsch gemacht habe...

MFG Doc Morelli

P.S. Gibt es nicht irgendwo ein Tutorial zu dieser Komponente? Hab bis jetzt keins gefunden...
Martin W
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 116



BeitragVerfasst: Mi 18.08.04 17:52 
Ein bisschen Sourcecode wäre gut um dein Problem besser lösen zu können...
Doc Morelli Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Mi 18.08.04 18:27 
Zitat:
Bindings: 0.0.0.0:80
Active: True
Reply Texts:
Text: Text einer HTML-Seite
TextCode: text/html


Das hab ich eingestellt, wie oben geschrieben...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, IdBaseComponent, IdComponent, IdTCPServer, IdCustomHTTPServer,
  IdHTTPServer;

type
  TForm1 = class(TForm)
    IdHTTPServer1: TIdHTTPServer;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

end.


Das ist die Unit...

Und dann hier noch der Quelltext der HTML Seite:

Zitat:
<html>
<head>
<title>Meine Homepage</title>
</head>
<style type="text/css">
a:link {color:#000000; font-style:times new roman}
a:visited {color:#000000; font-style:times new roman}
a: active {color:#000000; font-style:times new roman}
</style>

<body>
<div style="position:absolute; left:400; top:350">
<a href="home.html" onmouseover="javascript:pp()" onmouseout="javascript:p()"><b>
<font color="black" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
Weiter</font></b></a>
</div>
<div id="ebene2" style="position:absolute; left:100; top:210;
width:150pt; font-size:24pt; color:white; background-color:green">
Homepage!
</div>

<div id="ebene1" style="position:absolute; font-family:Impact; width:90pt;
left:300; top:200; font-size:24pt; color:blue; background-color:yellow">
Gonzo's
</div>
</body>
<script language="JavaScript">

function p()
{ meinPopup.hide();
}

var move1=new Array
(
269,316, 268,314, 266,312,
266,312, 265,308, 260,298,
249,277, 243,266, 233,253,
227,243, 222,233, 218,220,
213,212, 210,205, 204,195,
199,185, 198,180, 197,174,
193,164, 189,156, 183,150,
179,144, 175,139, 172,132,
170,127, 168,125, 167,124,
166,123, 165,123, 164,122,
163,121);

var move2=new Array
(
510,168, 508,168, 499,168,
492,169, 479,172, 462,176,
451,180, 437,185, 411,191,
389,196, 380,203, 364,215,
342,233, 332,243, 323,254,
314,263, 309,272, 302,281,
296,286, 292,290, 289,293);

var offset1=0;
var offset2=0;
var status=true;

if (document.layers)
{ebene_1=document.ebene1;
ebene_2=document.ebene2;
}
else
{ebene_1=ebene1.style;
ebene_2=ebene2.style;
}

steuerung();

function steuerung()
{ status=false;
if (offset1<move1.length)
{move(ebene_1,move1,offset1)
offset1=offset1+2;
}
if (offset2<move2.length)
{move(ebene_2,move2,offset2)
offset2=offset2+2;
}
if (status==true)
setTimeout ("steuerung()",50);
}



function move(ebene,koord,offset)
{
ebene.left=koord[offset];
ebene.top=koord[offset+1];
status=true;
}


function pp(){
meinPopup = window.createPopup();
var meinPopupBody = meinPopup.document.body;
meinPopupBody.style.backgroundColor = "yellow";
meinPopupBody.style.border = "solid green 2px";
meinPopupBody.innerHTML = "Klick auf <i>Weiter</i>, um <b>alles</b> über mich und meine Familie zu erfahren...";
meinPopup.show(450, 365, 250, 42, document.body);}

</script>
</html>



Hoffe, mir kann doch jemand helfen...

MFG Doc