Einzelnen Beitrag anzeigen

Benutzerbild von retnyg
retnyg

Registriert seit: 11. Feb 2005
193 Beiträge
 
#10

Re: String in TWebBrowser laden???

  Alt 3. Mai 2006, 12:54
ist zwar ein altes thema, aber mit einem frameset scheint das ganze nicht zu funktionieren...

hast du ne ahnung warum ?

Delphi-Quellcode:

const newframeset = '<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN > <META http-equiv= Content-Type content= text/html; charset=iso-8859-1 > '#13 +
#10'<HTML> <HEAD> <TITLE>test</TITLE> '#13 +
#10'</HEAD> '#13 +
#10'<FRAMESET BORDER= 0 COLS= 191,609,* > '#13#10' <FRAME NAME= navigation ID= navigation FRAMEBORDER= 0 NORESIZE= NORESIZE SCROLLING= NO SRC= %s > '#13 +
#10' <FRAMESET BORDER= 0 ROWS= 60,* > '#13 +
#10' <FRAME NAME= statusbar ID= statusbar FRAMEBORDER= 0 NORESIZE= NORESIZE SCROLLING= NO SRC= %s >'#13 +
#10 +
' <FRAME NAME= mainframe ID= mainframe FRAMEBORDER= 0 NORESIZE= NORESIZE SCROLLING= NO SRC= %s >'#13 +
#10' </FRAMESET> '#13 +
#10' <NOFRAMES> Ihr Browser kann diese Seite leider nicht anzeigen. </NOFRAMES>'#13 +
#10'</FRAMESET> '#13 +
#10'</HTML> ';

 frame1 = 'test.html';
 frame2 = 'test.html';
 frame3 = 'test.html';

     newhtml := format( newframeset, [frame1 , frame2 , frame3]);
     olevariant(webbrowser1.document as IHTMLDocument2).clear;
     olevariant(webbrowser1.document as IHTMLDocument2).write(newhtml);
     olevariant(webbrowser1.document as IHTMLDocument2).close;
  Mit Zitat antworten Zitat