![]() |
Frame hinzufügen in Document
Hallo
Wie kann man in ein IHtmlDocument2 ein neues Frame hinzufügen? In JS geht es so:
Code:
Mein Ansatz in Delphi, komme jedoch nicht weiter
function makeNewFrame(parentFrameId,newFrameId,targetUri) {
var newFrame = document.createElement("frame"); newFrame.id = newFrameId; newFrame.name = newFrameId; newFrame.src = targetUri; var frameset = document.getElementById(parentFrameId); frameset.appendChild(newFrame); }
Delphi-Quellcode:
var
Doc: IHTMLDocument2; coll: IHtmlElementCollection; begin Doc := Webbrowser1.Document as IHTMLDocument2; coll := (Doc as IHTMLDocument3).getElementsByName('sampleframe1'); coll...appendChild.? |
Re: Frame hinzufügen in Document
# PUSH #
|
Re: Frame hinzufügen in Document
Da du hier nicht zeigst, was du bis jetzt wie machst, kann dir auch keiner konkret helfen...
![]() ![]() ![]() folgende Units sind ebenfalls wichtig: MSHTML, ActiveX |
Re: Frame hinzufügen in Document
Zitat:
Zitat:
|
Re: Frame hinzufügen in Document
Zitat:
Also wir halten fest: Wie, wann, welchen, wo,... |
Re: Frame hinzufügen in Document
Lade z.B die Seite
![]() Zitat:
Wann: Zu irgend einem Zeitpunkt, wenn die Seite schon geladen ist. Welchen: Irgend einen Frame Wo: z.B ein Frame oben. |
Re: Frame hinzufügen in Document
Code:
<html>
<frameset name="f1" cols="196,85%"> <frame src="zweiframes_links.htm" name="links"> <frameset name="f2" rows="212,73%"> <frame src="zweiframes_to.htm" name="oben"> <frame src="zweiframes_tu.htm" name="unten"> </frameset> </frameset> </html>
Delphi-Quellcode:
var frameset, frame: OleVariant;
begin frameset:=WebBrowser1.OleObject.document.getElementsByName('f1').Item(0); frame:= WebBrowser1.OleObject.document.getElementsByName('links').Item(0); frameset.removeChild(frame); frame:= WebBrowser1.OleObject.document.createElement('frame'); frame.id := 'newFrame'; frame.name:= 'newFrame'; frame.src:= 'frame.html'; frameset.appendChild(frame); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:22 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz