IHTMLAreaElement

IHTMLAreaElement


This interface specifies the shape of a "hot spot" in a client-side image MAP.

IHTMLAreaElement Methods
blur   focus   get_alt  
get_coords   get_hash   get_host  
get_hostname   get_href   get_noHref  
get_onblur   get_onfocus   get_pathname  
get_port   get_protocol   get_search  
get_shape   get_tabIndex   get_target  
put_alt   put_coords   put_hash  
put_host   put_hostname   put_href  
put_noHref   put_onblur   put_onfocus  
put_pathname   put_port   put_protocol  
put_search   put_shape   put_tabIndex  
put_target

IHTMLAreaElement::blur

HRESULT blur(void);

Causes the element to lose the focus and executes the code specified by get_onblur.

See also put_onblur

IHTMLAreaElement::focus

HRESULT focus(void);

Causes the element to receive the focus and executes the onfocus event.

See also get_onfocus, put_onfocus

IHTMLAreaElement::get_alt

HRESULT get_alt(
    BSTR *p
);

Retrieves the optional text as an alternative to the graphic for rendering in nongraphical environments. Alternate text should be provided whenever the graphic is not rendered.

p
Address of a string variable that receives the optional text.

See also put_alt

IHTMLAreaElement::get_coords

HRESULT get_coords(
    BSTR *p
);

Retrieves the coordinates that define the hot spot's shape.

p
Address of a string variable that receives the coordinates.

See also put_coords

IHTMLAreaElement::get_hash

HRESULT get_hash(
    BSTR *p
);

Retrieves the string stored in the hash property of the AREA object.

p
Address of a string variable that receives the hash portion of the URL. If the URL has no hash string, this parameter receives an empty string.

See also put_hash

IHTMLAreaElement::get_host

HRESULT get_host(
    BSTR *p
);

Retrieves the host name and the optional port information of the location or URL.

p
Address of the string variable where the host name and optional port information will be stored.

See also put_host

IHTMLAreaElement::get_hostname

HRESULT get_hostname(
    BSTR *p
);

Retrieves the host-name part of the location or URL.

p
Address of a string variable that receives the host name. If no host name is available, this parameter receives an empty string.

See also put_hostname

IHTMLAreaElement::get_href

HRESULT get_href(
    BSTR *p
);

Retrieves the destination URL or anchor point.

p
Address of a string variable that receives the URL.

The HREF attribute on the anchor is a scriptable attribute. HREFs on anchors can jump to bookmarks or any element's id attribute.

See also put_href

IHTMLAreaElement::get_noHref

HRESULT get_noHref(
    VARIANT_BOOL *p
);

Determines whether clicks in this region should cause no action.

p
Address of a Boolean variable that is set to TRUE if clicks cause no action, or FALSE otherwise. The default value for this property is FALSE.

See also put_noHref

IHTMLAreaElement::get_onblur

HRESULT get_onblur(
    VARIANT *p
);

Retrieves the inline script associated with the onblur event on the AREA element.

p
Address of VARIANT structure that contains the script.

See also put_onblur, blur

IHTMLAreaElement::get_onfocus

HRESULT get_onfocus(
    VARIANT *p
);

Retrieves the inline script associated with the onfocus event on the AREA element.

p
Address of a VARIANT structure that contains the script.

See also put_onfocus, focus

IHTMLAreaElement::get_pathname

HRESULT get_pathname(
    BSTR *p
);

Retrieves the file or object path from the URL for the current browser location.

p
Address of a string variable that receives the path.

See also put_pathname

IHTMLAreaElement::get_port

HRESULT get_port(
    BSTR *p
);

Retrieves the port number from the URL.

p
Address of a string variable that receives the port number. If no port is specified, this parameter receives an empty string.

See also put_port

IHTMLAreaElement::get_protocol

HRESULT get_protocol(
    BSTR *p
);

Retrieves the protocol portion of the URL. The protocol portion, which indicates the access method, includes the initial substring of the URL up to and including the first colon.

p
Address of a string variable that receives the protocol.

See also put_protocol

IHTMLAreaElement::get_search

HRESULT get_search(
    BSTR *p
);

Retrieves the substring that follows the ? symbol in the href property of the AREA object.

p
Address of a string variable that receives the query string or form data.

See also put_search

IHTMLAreaElement::get_shape

HRESULT get_shape(
    BSTR *p
);

Retrieves the type of shape used in the image map.

p
Address of a string variable that receives one of the following strings:
"circ"
"circle"
"poly"
"polygon"
"rect"
"rectangle"

Each shape causes the coords property of the AREA object to take a different set of values. The relationships are as follows:
RECT Rectangle. Takes four coordinates: x1, y1, x2, and y2.
RECTANGLE Rectangle. Takes four coordinates: x1, y1, x2, and y2.
CIRC Circle. Takes three coordinates: centerx, centery, and radius.
CIRCLE Circle. Takes three coordinates: centerx, centery, and radius.
POLY Polygon. Takes three or more pairs of coordinates denoting a polygonal region.
POLYGON Polygon. Takes three or more pairs of coordinates denoting a polygonal region.

See also put_shape

IHTMLAreaElement::get_tabIndex

HRESULT get_tabIndex(
    short *p
);

Retrieves the tab index for the object.

p
Address of a short integer variable that receives the tab index.

Tab selection order is determined by the value of the tabIndex property as follows:

See also put_tabIndex

IHTMLAreaElement::get_target

HRESULT get_target(
    BSTR *p
);

Retrieves the target window or frame.

p
Address of a string variable that receives the target window or frame. Can be one of the following values:
_blank Specifies to load the link into a new blank window. This window is not named.
_parent Specifies to load the link into the immediate parent of the document the link is in.
_self Specifies to load the link into the same window the link was clicked in.
_top Specifies to load the link into the full body of the window.

If there is no frame or window that matches the specified target, a new window is opened for the link.

The default value for the target depends upon the URL and site. If the user does not leave the site, the default is _self, but if the user exits to a new site, the default is _top.

IHTMLAreaElement::put_alt

HRESULT put_alt(
    BSTR v
);

Sets the optional text, which is used as an alternative to the graphic for rendering in nongraphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.

v
String specifying the optional text.

See also get_alt

IHTMLAreaElement::put_coords

HRESULT put_coords(
    BSTR v
);

Sets the coordinates that define the hot spot's shape.

v
String value containing the coordinates.

See also get_shape

IHTMLAreaElement::put_hash

HRESULT put_hash(
    BSTR v
);

Sets the string associated with the hash property of the AREA object.

v
String value specifying the hash portion of the URL.

This property is useful for moving to a bookmark within a document. Assigning an invalid value does not cause an error.

See also get_hash

IHTMLAreaElement::put_host

HRESULT put_host(
    BSTR v
);

Sets the host name and the optional port information of the location or URL.

v
String value specifying the host name and port information.

See also get_host

IHTMLAreaElement::put_hostname

HRESULT put_hostname(
    BSTR v
);

Sets the host-name portion of the location or URL.

v
String value specifying the host name.

See also get_hostname

IHTMLAreaElement::put_href

HRESULT put_href(
    BSTR v
);

Sets the destination URL or anchor point.

v
String value specifying the URL.

The HREF attribute on the anchor is a scriptable attribute. HREFs on anchors can jump to bookmarks or any element's id attribute.

See also get_href

IHTMLAreaElement::put_noHref

HRESULT put_noHref(
    VARIANT_BOOL v
);

Sets whether clicks in this region should cause no action.

v
Boolean value that determines if an action should occur. TRUE causes no action when clicked; FALSE does. The default value for this property is FALSE.

See also get_noHref

IHTMLAreaElement::put_onblur

HRESULT put_onblur(
    VARIANT v
);

Sets the inline script associated with the onblur event for the AREA element.

v
VARIANT structure that contains the script to set.

See also get_onblur

IHTMLAreaElement::put_onfocus

HRESULT put_onfocus(
    VARIANT v
);

Sets the inline script associated with the onfocus event for the AREA element.

v
VARIANT structure that contains the script to set.

See also get_onfocus

IHTMLAreaElement::put_pathname

HRESULT put_pathname(
    BSTR v
);

Sets the file or object path of the URL.

v
String value specifying the path.

See also get_pathname

IHTMLAreaElement::put_port

HRESULT put_port(
    BSTR v
);

Sets the port number in a URL.

v
String value specifying the port number.

See also get_port

IHTMLAreaElement::put_protocol

HRESULT put_protocol(
    BSTR v
);

Sets the initial substring up to and including the first colon, which indicates the URL's access method.

v
String value specifying the protocol substring.

See also get_protocol

IHTMLAreaElement::put_search

HRESULT put_search(
    BSTR v
);

Sets the substring that follows the ? symbol in the href property of the AREA object. This is the query string or form data.

v
String value specifying the query string or form data.

See also get_search

IHTMLAreaElement::put_shape

HRESULT put_shape(
    BSTR v
);

Sets the type of shape used in the image map.

v
String value specifying the shape. Can be one of these values:
"circ"
"circle"
"poly"
"polygon"
"rect"
"rectangle"

Each shape causes the coords property to take a different set of values. The relationships are described as follows:
RECT Rectangle. Takes four coordinates: x1, y1, x2, and y2.
RECTANGLE Rectangle. Takes four coordinates: x1, y1, x2, and y2.
CIRC Circle. Takes three coordinates: centerx, centery, and radius.
CIRCLE Circle. Takes three coordinates: centerx, centery, and radius.
POLY Polygon. Takes three or more pairs of coordinates denoting a polygonal region.
POLYGON Polygon. Takes three or more pairs of coordinates denoting a polygonal region.

See also get_shape

IHTMLAreaElement::put_tabIndex

HRESULT put_tabIndex(
    short v
);

Sets the tab index for the object.

v
Short integer value specifying the tab index.

Tab selection order is determined by the value of the tabIndex property as follows:

See also get_tabIndex

IHTMLAreaElement::put_target

HRESULT put_target(
    BSTR v
);

Sets the target window or frame.

v
String value specifying the target window or frame. Can be one of the following special values:
_blank Specifies to load the link into a new blank window. This window is not named.
_parent Specifies to load the link into the immediate parent of the document the link is in.
_self Specifies to load the link into the same window the link was clicked in.
_top Specifies to load the link into the full body of the window.

If there is no frame or window that matches the specified target, a new window is opened for the link.

The default value for the target depends upon the URL and site. If the user does not leave the site, the default is _self, but if the user exits to a new site, the default is _top.

See also get_target

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.