Ich habe das, was ich wollte. Ein wenig experimentieren, im INternet surfen, testen, testen, testen ....
Ich wollte: in einem Formular eines der definierten Stylesheet Bereiche angeben, um dann dort einen Text ausgeben zu lassen.
Ich habe das HTML und CGI Skript etwas geändert.
Hier das HTML Dokument:
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<html>
<head>
<title>
Test output
</title>
<style type="text/css">
body { margin:0; padding:0;}
div { border:1px solid #888; }
#login { width:512px; height:150px; position:absolute; top:0px; left:0px; }
#info { width:512px; height:150px; margin-left: 512px; }
#filter { width:200px; height:150px; margin-top: 0px; }
#toplist{ width:200px; height:468px; margin-top: 0px; }
#output { width:824px; height:618px; position:absolute; top:150px; left:200px; )
</style>
</head>
<body>
<div id="login">
<form action="/cgi-bin/cgi.pl" method="post">
<table border="0">
<colgroup><col width="150"></colgroup>
<tr>
<td align="right">Text:</td>
<td><input name="value1" type="text" size="30" maxlength="100" value="output" /></td>
</tr>
<tr>
<td align="right">Output window:</td>
<td><input name="value2" type="text" size="30" maxlength="100" value="output" /></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" class="Button" value="send">
</td>
</tr>
</table>
</form>
</div>
<div id="info">Info:</div>
<div id="filter">Filter:</div>
<div id="toplist">Toplist:</div>
<div id="output">Output:</div>
</body>
</html>
Und hier das CGI Skript:
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!c:/xampp/perl/bin/perl.exe
use CGI qw(:all);
use strict;
use warnings;
my $cgi = new CGI;
my $text = param ('value1');
my $windows = param ('value2');
output($cgi, $text, $windows);
exit;
#########################################################
#########################################################
sub output{
my $cgi = shift;
my $text = shift;
my $window = shift;
my $style = get_style();
print $cgi -> header;
print $cgi -> start_html(
-style => {-code => $style},
);
print $cgi -> div ( {-id => $window}, $text );
print $cgi -> end_html;
}
sub get_style {
my $style = <<"EOSTYLE";
body { margin:0; padding:0;}
div { border:1px;}
\#login { width:512px; height:150px; position:absolute; left:0px; top:0px; color:green; }
\#info { width:512px; height:150px; position:absolute; left:512px; top:0px; color:red; }
\#filter { width:200px; height:150px; position:absolute; left:0px; top:150px; color:black; }
\#toplist { width:200px; height:468px; position:absolute; left:0px; top:300px; color:magenta; }
\#output { width:824px; height:618px; position:absolute; left:150px; top:200px; color:blue; }
EOSTYLE
return $style;
}
Ich freue mich :):)
Danke an alle für Eure Anregungen!!!
mfg André