AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Nur Frame ändern

Ein Thema von tms · begonnen am 17. Mär 2006 · letzter Beitrag vom 3. Apr 2006
Antwort Antwort
Seite 1 von 2  1 2      
tms

Registriert seit: 13. Feb 2006
Ort: Ludwigsburg
12 Beiträge
 
#1

Nur Frame ändern

  Alt 17. Mär 2006, 17:33
Hi!
Ich rufe in Delphi im Webbrowser eine Seite mit Frames auf. Über einen Button möchte ich aber nur eine Frame austauschen. Wie mach ich das??
  Mit Zitat antworten Zitat
tms

Registriert seit: 13. Feb 2006
Ort: Ludwigsburg
12 Beiträge
 
#2

Re: Nur Frame ändern

  Alt 18. Mär 2006, 16:58
SO hab nochmals intersiv gegoogelt:

procedure Navigate(const URL: WideString; var Flags: OleVariant; var TargetFrameName: OleVariant); overload;

Das ist alles, was ich gefunden habe:

Bisher hab ichs so: WebBrowser1.Navigate(url);

Wie bekomm ich da jetzt das Frame rein??

Thomas
  Mit Zitat antworten Zitat
Benutzerbild von Master_RC
Master_RC

Registriert seit: 18. Jan 2005
459 Beiträge
 
Delphi 7 Enterprise
 
#3

Re: Nur Frame ändern

  Alt 18. Mär 2006, 17:11
Schau doch mal die Parameter von "Navigate()" an

procedure Navigate(const URL: WideString; var Flags: OleVariant; var TargetFrameName: OleVariant);
Ein Volk ist nur soviel wert, wie es dessen Toten ehrt.
  Mit Zitat antworten Zitat
tms

Registriert seit: 13. Feb 2006
Ort: Ludwigsburg
12 Beiträge
 
#4

Re: Nur Frame ändern

  Alt 18. Mär 2006, 18:14
WebBrowser1.Navigate(url,'','frame');

So klappt es aber leider nicht!

Thomas
  Mit Zitat antworten Zitat
Benutzerbild von Master_RC
Master_RC

Registriert seit: 18. Jan 2005
459 Beiträge
 
Delphi 7 Enterprise
 
#5

Re: Nur Frame ändern

  Alt 18. Mär 2006, 18:35
TargetFrameName ist ja vom Typ her auch kein String

Schau mal nach, wie das Ding aussieht (Bei Delphi7 kann ich einfach per STRG+Klick auf das Ding herausfinden, was das ist )
Ein Volk ist nur soviel wert, wie es dessen Toten ehrt.
  Mit Zitat antworten Zitat
tms

Registriert seit: 13. Feb 2006
Ort: Ludwigsburg
12 Beiträge
 
#6

Re: Nur Frame ändern

  Alt 18. Mär 2006, 18:56
Hab Delphi 2005 PE und da klappt es nicht, könnstest es du mir nicht einfach bitte sagen, wie es geht??

Thomas
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#7

Re: Nur Frame ändern

  Alt 18. Mär 2006, 19:02
WebBrowser.Navigate('http://www.delphipraxis.net', null, 'bigframe', null, null); Grüße vom marabu
  Mit Zitat antworten Zitat
tms

Registriert seit: 13. Feb 2006
Ort: Ludwigsburg
12 Beiträge
 
#8

Re: Nur Frame ändern

  Alt 19. Mär 2006, 09:29
WebBrowser.Navigate('http://www.delphipraxis.net', null, 'bigframe', null, null);

gibt folgenden Fehler aus:
E2250 Es gibt keine überladene Version von 'Navigate', die man mit diesen Argumenten aufrufen kann
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#9

Re: Nur Frame ändern

  Alt 19. Mär 2006, 09:35
Hallo Thomas,

jetzt ist der Augenblick gekommen, an dem du völlig selbständig in die Referenz zum IWebBrowser2 Interface rein schauen musst: klick

marabu
  Mit Zitat antworten Zitat
tms

Registriert seit: 13. Feb 2006
Ort: Ludwigsburg
12 Beiträge
 
#10

Re: Nur Frame ändern

  Alt 19. Mär 2006, 10:46
Hi!

Ich komm damit leider nicht weiter:

Zitat:
Syntax

HRESULT Navigate( BSTR url,
VARIANT *Flags,
VARIANT *TargetFrameName,
VARIANT *PostData,
VARIANT *Headers
);
Parameters

url
[in] Required. A BSTR expression that evaluates to the URL, full path, or Universal Naming Convention (UNC) location and name of the resource to display.
hab ich so gemacht, da kann man ja nichts falsch machen!
Zitat:
Flags
[in] Pointer to a variable that specifies whether to add the resource to the history list, whether to read to or write from the cache, and whether to display the resource in a new window. The variable can be a combination of the values defined by the BrowserNavConstants enumeration.
TargetFrameName
[in] Pointer to a string that contains the name of the frame in which to display the resource. The possible values for this parameter are:
_BLANK
Load the link into a new unnamed window.
_PARENT
Load the link into the immediate parent of the document the link is in.
_SELF
Load the link into the same window the link was clicked in.
_TOP
Load the link into the full body of the current window.
<WINDOW_NAME>
A named HTML frame. If no frame or window exists that matches the specified target name, a new window is opened for the specified link.
Will ich ja machen! Auch in <> bringt nichts.
Zitat:
PostData
[in] Pointer to data to send with the HTTP POST transaction. For example, the POST transaction is used to send data gathered by an HTML form. If this parameter does not specify any post data, IWebBrowser2::Navigate issues an HTTP GET transaction. This parameter is ignored if URL is not an HTTPURL.
Headers
[in] Pointer to a value that contains the HTTP headers to send to the server. These headers are added to the default Microsoft Internet Explorer headers. The headers can specify things such as the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if URL is not an HTTPURL.
Return Value

Returns one of the following values.

S_OK The operation was successful.
E_INVALIDARG One or more parameters are invalid.
E_OUTOFMEMORY Out of memory.


Remarks

The post data specified by PostData is passed as a SAFEARRAY Data Type structure. The VARIANT should be of type VT_ARRAY and point to a SAFEARRAY Data Type. The SAFEARRAY Data Type should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.

The WebBrowser control or InternetExplorer object can browse to any location in the local file system, on the network, or on the World Wide Web. Use the IWebBrowser2::Navigate method to tell the browser which location to browse to. By including a text box in your application, you can let the user specify the location to browse to and then pass the location to the IWebBrowser2::Navigate method.

In Internet Explorer 6 or later, you can navigate through code only within the same domain as the application hosting the WebBrowser control. Otherwise, this method is disabled.
Also ich kann leider keinen Fehler feststellen!
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:45 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz