Skip to Content

Can i access attributes from IF_HTTP_HEADER_FIELDS ?

Hello

The IF_HTTP_HEADER_FIELDS contains some attributes (like REFERER or VIA) I find interesting, but are they usable - can anyone give ex. of usage and how to?

Best regards

Thomas Madsen Nielsen

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 05, 2003 at 10:37 AM

    You can read (nearly) all HTTP Header fields which the client sends; and you can set (nearly) all HTTP header fields using the appropriate methods (GET_HEADER_FIELDS method of the request object; SET_HEADER_FIELD(S) of the response object).

    But you have to take care: Not every HTTP header is a must! e.g. "referrer" is an OPTIONAL header fields which the client can send or not (see http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html).

    Add comment
    10|10000 characters needed characters exceeded

    • Hallo Manny,

      Yes are welcome to start a new thread for new questions 😊

      Now let us look at the button code. You effectively have three permutations you can write, and their meanings. Here "..." is for the id, text, tooltip etc parameters.

      (1) <htmlb:button ... onClick = "myHandler" />

      This onClick here is just a symbolic string. It means you are interested in the event of the button at the server. The myHandler is a string you can use to dispatch events somewhere, etc. (Sending events to server is just a submit of the HTML form.)

      (2) <htmlb:button ... onClientClick = "alert('Hit me more!');" />

      In this case no onClick handler is set. Thus no event is required at the server. When the user clicks the button, the onClientClick string is executed in the browser. This must be JavaScript code.

      (3) <htmlb:button ... onClick = "myHandler" onClick="alert('Hang 10, we going to roundtrip')" />

      This does both of the above. First execute the Javascript, and then send the event to the server (if not canceled).

      (4) <htmlb:button ... />

      This button has no events, and it will not help to be pressed. So effectively we render this button as disabled.

      I would seriously recommend that you play with our test BSP applications. They all use buttons. See BSP applications: HTMLB_SAMPLES, SBSPEXT_HTMLB, SBSPEXT_XHTMLB and SBSPEXT_PHTMLB (>sp30).

      brian