Q&A

  • web메서드
WebBrowser1.Navigate(ComboBox1.Text, a,b,c,d);에서 파라미터

a,b,c,d,의 내용이 무엇인가요?

type만 정의되어 있고 그 의미가 설명된 책은 없네요.

꼭 가르쳐 주세요.

1  COMMENTS
  • Profile
    글쎄요. 1999.05.28 00:35
    MS의 MSDN라이브러리를 참조하셔요

    여기예요.

    http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/Navigate.asp#Navigate

    다음은 위에서 가져온 영어원문입니다.

    --------------------------------------------------------------------------------



    Navigates to the resource identified by a Universal Resource Locator (URL)

    or to the file identified by a full path.



    Syntax

    -----------------------------------

    object.Navigate( URL [Flags,] [TargetFrameName,] [PostData,] [Headers])

    Parameters

    -----------------------------------

    object

    Required. An object expression that evaluates to an object in the Applies To list.

    -----------------------------------

    URL

    Required. A string expression that evaluates to the URL, full path, or Universal

    Naming Convention (UNC) location and name of the resource to display.

    -----------------------------------

    Flags

    Optional. A constant or value that specifies whether to add the resource to

    the history list, whether to read from or write to the cache, and whether

    to display the resource in a new window. It can be a combination of the

    following constants or values.



    navOpenInNewWindow 1 Open the resource or file in a new window.

    navNoHistory 2 Do not add the resource or file to the history list. The new page replaces the current page in the list.

    navNoReadFromCache 4 Do not read from the disk cache for this navigation.

    navNoWriteToCache 8 Do not write the results of this navigation to the disk cache.

    -----------------------------------

    TargetFrameName

    Optional. String expression that evaluates to the name of an HTML frame in URL

    to display in the browser window. 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.

    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.

    -----------------------------------

    PostData

    Optional. Data to send to the server during the HTTP POST transaction.

    For example, the POST transaction is used to send data gathered by an

    HTML form to a program or script. If this parameter does not specify

    any post data, the Navigate method issues an HTTP GET transaction.

    This parameter is ignored if URL is not an HTTP URL.

    -----------------------------------

    Headers

    Optional. A value that specifies additional HTTP headers to send to the server.

    These headers are added to the default MicrosoftR Internet Explorer headers.

    The headers can specify things like 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 HTTP URL.

    -----------------------------------



    다음은 박후선님이 쓴 WebBrowser콘트롤 중에서 발췌한 것임.



    Navigate 메쏘드를 이용한 새로운 위치의 네비게이트



    WebBrowser의 가장 기본적인 이용은 Navigate 메쏘드를 통해 이루어진다. 언급한

    바 있듯이 IE에서 지원하는 모든 파일을 로컬, 네트워크, 웹을 통해 억세스할 수

    있다. Navigate 메쏘드의 원형은 다음과 같다.



    procedure Navigate(const URL: WideString; var Flags, TargetFrameName,

    PostData, Headers: OleVariant); safecall;



    인자 URL에는 브라우즈할 위치를 넣는다. 웹상의 문서를 억세스할 경우는 URL을

    적어주면 된다. TEdit등을 통해서 URL을 받아서 넣어주는 것이다.



    WebBrowser 오브젝트는 특정 프레임에 결과를 디스플레이 할 수 있는 기능을 지

    원하고 있다. 우선은 프레임을 이용한 문서를 Navigate 메쏘드를 통해 읽어온다.

    이 후, Navigate를 호출 할 때 TargetFrameName을 지정해 주어 특정 프레임에 결

    과가 표시되도록 만들면 된다.



    일단 Navigate 메쏘드가 호출되면 LocationName, LocationURL등의 프로퍼티를 이

    용해 현재 디스플레이된 위치에 대한 정보를 얻을 수 있다. 웹상이라면

    LocationName에는 해당 HTML 페이지의 타이틀이 들어오고, LocaltionURL에는

    HTML의 URL이 들어온다. 로컬이나 네트워크상이라면 해당 폴더나 파일의 전체 경

    로명이 들어온다.



    사용자가 하이퍼링크를 선택하면 HTTP transaction을 통해 HTTP Header와 HTTP

    PostData를 프로그램에 전달한다. HTTP Header와 HTTP PostData는 인자로 주어진

    OLEVariant형 PostData, Headers를 통해 지정하고 또 값을 받아온다.



    Flags에는 특정 상황을 인자로 주거나 현재 상황을 받아오는데 이용하는데 , 다

    음과 같은 값들의 조합으로 이루어진다.



    ─────────────────────────────────────

    상수명(델파이에는없음) 값 의미

    ─────────────────────────────────────

    navOpenInNewWindow 1 새로운 윈도우에 리소스를 연다.

    navNoHistory 2 History기능을 이용하지 않는다. 즉,

    새로운 페이지는 현재 페이지를 덮어

    쓴다.

    navNoReadFromCache 3 현재의 네비게이트를 디스크캐쉬에서

    읽어오지 않는다.

    navNoWriteToCache 4 현재의 네비게이트를 디스크캐쉬에 저

    장하지 않는다.

    ─────────────────────────────────────



    위의 상수는 델파이 내에서는 정의되어 있지 않으므로 따로 구성해서 사용하던지

    아니면 상수값을 그대로 이용하면 된다.