Autor Beitrag
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 11.12.05 11:15 
Hallo,

ich möchte in HTML einen Link erstellen, der mir ein neues Browser-Fenster in bestimmter Größe und mit bestimmter Position öffnet. Das Öffnen eines neuen Fensters ansich mit nem HTNL-File drin is ja kein Problem, was muss ich jetzt noch hinzufügen?
Ich bin, wie man an der Frage unschwer erkennen kann, noch Anfänger in HTML.


mfg
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 11.12.05 11:59 
Hi,
versuch mal das hier:
ausblenden HTML-Dokument
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
<html>
<head><title>1. Seite</title>
<script language="JavaScript">
<!--
function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

</head>
<body onLoad="openWindow('2te_Seite.html','fenster1','toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=no,resizable=yes,width=200,height=400')">

</body>
</html>


Bye

Moderiert von user profile iconTh69: Code- durch HTML-Tags ersetzt
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: So 11.12.05 12:00 
Hallo,

da wirst Du Dich mit Javascript beschäftigen müssen,
ist glaube ich nur mit HTML nicht möglich.
:arrow: SELFHTML: open()

//Edit: zu spät :(

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 11.12.05 12:08 
Vielen Dank! :D
DeTomaso33
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 52
Erhaltene Danke: 1

Windows10
C#,HTML,CSS3,Javascript
BeitragVerfasst: Do 11.02.16 15:34 
Hallo,

ich habe da noch eine Lösung gefunden ohne Javascript(steht zwar im head,ist aber bei mir leer)!
ausblenden HTML-Dokument
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>1. Seite</title>
   <script src="JavaScript.js">
<!--
    function openWindow(theURL, winName, features) { //v2.0
        window.open(theURL, winName, features);
    }
    //-->

</script>
</head>
<body>
    <a href="2te_Seite.html">2te_Seite.html</a><br></br>
    <a href="2te_Seite.html" onclick="window.open(this.href, 'Fenster 2', 'toolbar=yes,menubar=yes,width=800,height=800,left=100,top=200'); return false">Link</a>
</body>


Die 2te Seite ist im Titel(wirklich nötig?) vorbereitet worden (hier: <titel>Fenster 2</titel> ) Das function openWindow ist nur der Kommentar,wie das aufzubauen ist. Die Optionen können aus den anderen Anmerkungen so übernommen werden. Das zweite href mit 'onclick' liefert das gewünschte Ergebnis. Damit die 2te Seite nicht leer ist, sollte man/frau wenigstens im body der Seite ein <h1>Hallo Welt!</h1> einbauen.

Funktioniert! :wink:

Bei Andreas L. Lösungsansatz fehlt ein Link für Seite 2!

mfg
FinnO
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1331
Erhaltene Danke: 123

Mac OSX, Arch
TypeScript (Webstorm), Kotlin, Clojure (IDEA), Golang (VSCode)
BeitragVerfasst: Do 11.02.16 15:42 
Moin,

Ohne JavaScript ist deine Lösung nicht. Der onclick-handler für dein a-Element ist reinstes JavaScript. Grundsätzlich scheint dein Dokument aber etwas merkwürdig. Die XML Kommentare im Script tag werden sicher eine Javascript exception werfen.

Ferner: Ob du dafür den archäologischen Aufwand hättest treiben müssen, ein Thema von 2005 auszugraben weiß ich jetzt auch nicht ;)

Aber bleib am Ball,
Gruß
DeTomaso33
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 52
Erhaltene Danke: 1

Windows10
C#,HTML,CSS3,Javascript
BeitragVerfasst: Do 11.02.16 16:35 
Hallo FinnO,

richtig :lol: bis 2005 zurück zu gehen ist nicht angebracht. Aber hier im Forum war es ein Treffer bei meiner Suche. Nein, eine JavaScriptException gab es nicht.

Mein eigentliches Problem ist das Ganze für eine xml+xsl= html-Seite zu erzeugen bzw. für den Aufruf in die html-Seite das so reinzubekommen. Ich mache da in Programmiersprache Webentwicklung (Client) ein neues Thema auf. Für html-Verlinkung klappts, aber nicht bei einem xml. Ob's an dem fehlenden Titeleintrag liegt? :?:

mfg