int aw_url_send (int session_id, char* url, char* target)

DESCRIPTION

Sends a URL to a user's web browser.

CALLBACK

None (returns immediately)

NOTES

This method requires at least SDK build 14 and world server build 21.

aw_url_send sends a URL to the web browser of another user.  Set session_id to indicate the recipient of the URL.  Set url to contain the URL itself.  An optional target frame can be specified in target.   If no target frame is desired, pass NULL for target.  Note that If target specifies a non-existent frame, the URL will be displayed in a new, standalone window on the user's PC.

In 3.5 or later worlds, AW_URL_POST (string) and AW_URL_TARGET_3D (boolean) can be specified before calling aw_url_send. If AW_URL_POST is set, the browser will peform a post request using the specified data. Setting AW_URL_TARGET_3D to TRUE will load the page in the aw_3d view.

The URL is sent via the world server.  Thus, URLs can only be sent to users who are in the same world as the calling SDK application.  Also, currently an instance must have the caretaker right in order to send URLs to other users.

EXAMPLE

/* send the user's web browser to the Active Worlds home page
   if they click on my avatar */

void handle_avatar_click (void)
{
  /* 3.5 and above: target the aw_3d view and specify post data */
  aw_bool_set (AW_URL_TARGET_3D, TRUE);
  aw_string_set (AW_URL_POST, "foo=bar&text=hello%20world");

  if (aw_int (AW_CLICKED_SESSION) == aw_session ())
    aw_url_send (aw_int (AW_AVATAR_SESSION), "www.activeworlds.com", NULL);

}

aw_event_set (AW_EVENT_AVATAR_CLICK, handle_avatar_click);

SEE ALSO

AW_EVENT_URL