FOSSology  4.4.0
Open Source License Compliance by Open Source Software
common-active.php File Reference

These are common functions for performing active HTTP requests. (Used in place of AJAX or ActiveX.) More...

Go to the source code of this file.

Functions

 js_url ()
 Load a new url. More...
 
 displayMessage ($Message, $keep=null)
 Display a message. More...
 
 ActiveHTTPscript ($RequestName, $IncludeScriptTags=1)
 Given a function name, create the JavaScript needed for doing the request. More...
 

Detailed Description

These are common functions for performing active HTTP requests. (Used in place of AJAX or ActiveX.)

Definition in file common-active.php.

Function Documentation

◆ ActiveHTTPscript()

ActiveHTTPscript (   $RequestName,
  $IncludeScriptTags = 1 
)

Given a function name, create the JavaScript needed for doing the request.

The JavaScript takes a URL and returns the data. The JavaScript is Asynchronous (no wait while the request goes on).

Parameters
string$RequestName

The JavaScript variable name to use.

The javascript function is named "${RequestName}_Get"
The javascript function "${RequestName}_Reply" must be defined for handling the reply. (You will need to make this Javascript function.)

The javascript variable "${RequestName}.status" contains the reply's HTTP return code (200 means "OK") and "${RequestName}.readyState" is the handle's state (4 = "loaded").

boolean$IncludeScriptTagsIf will append the javascript tag. Default value is 1. empty on no, other on yes
Returns
The html (with embeded javascript)
See also
References: http://www.w3schools.com/xml/xml_http.asp

Definition at line 89 of file common-active.php.

◆ displayMessage()

displayMessage (   $Message,
  $keep = null 
)

Display a message.

This is used to convey the results of button push like upload, submit, analyze, create, etc.

Parameters
string$MessageThe message to display
string$keepA safe text string NOT run through htmlentities
Returns
The html to display (with embeded javascript)

Definition at line 43 of file common-active.php.

◆ js_url()

js_url ( )

Load a new url.

The new url is url+val e.g. js_url(this.value, "http:me?val=")

Definition at line 19 of file common-active.php.