PropertyEventMethodIndex
WebSquare.net - 5.0_4.5276B.20250218.131208

WebSquare.net Package

Type

engine

Property Summary

Event Summary

Method Summary

ajax( options )
AJAX function
download( actionUrl , XML , sendMethod , isXHR )
Downloads a file from the server.
getAllBASE64Parameter( )
Decodes all Base64-encoded get-type parameters, and returns the result in JSON format.
getAllParameter( )
Converts all parameters into JSON format.
getBASE64Parameter( param )
Decodes a Base64-encoded get-type parameter, and returns the result.
getParameter( param )
Converts a get type parameter into a string.

Property Detail

Event Detail

Method Detail

ajax( options )
AJAX function
Parameter
nametyperequireddescription
optionsObjectYJSON-type object
options.action : AJAX request address options.mode : asynchronous(default)/synchronous options.mediatype : application/x-www-form-urlencoded, application/json, application/xml, text/xml options.method : get/post/put/delete options.requestData : Request data. options.requestHeader : Text to add to the request header. (Used when needed.) options.timeout : Time-out period for AJAX requests. If no response arrives within the time-out, error callback will be executed. options.beforeAjax : Executed before the request. If "false" is returned by this function, AJAX request will not be made. options.success : A callback function executed upon a successful request. options.error : A callback function executed upon a failed request. options.externalHandler : Converts externally interfaced data such as those for encryption/decryption. s an argument, option object is sent and option.requestData can access the data. After the data is processed, the user-defined function must return a string.
Sample
var options = {}; options.action = "http://localhost:8080/test.jsp"; options.mode = "asynchronous"; options.mediatype = "text/xml"; options.method = "post"; options.requestData = "<test/>"; options.requestHeader = {"temp1":"hello", "temp2":"world"}; // Add temp1 and temp2 to the request header. options.success = doSucess; options.error = doError; WebSquare.net.ajax( options );
download( actionUrl , XML , sendMethod , isXHR )
Downloads a file from the server.
Parameter
nametyperequireddescription
actionUrlStringYURL to access to download the file
XMLStringYA character string xmlValue is sent to the server. If not specified, other values than xmlValue will be sent to the server.
sendMethodStringYTransmission method (get or post). The default is post.
isXHRStringYxhr status (Default: false)
Sample
WebSquare.net.download( url, "<test></test>", "post" );
getAllBASE64Parameter( )
Decodes all Base64-encoded get-type parameters, and returns the result in JSON format.
Sample
WebSquare.net.getAllBASE64Parameter();
getAllParameter( )
Converts all parameters into JSON format.
Sample
WebSquare.net.getAllParameter();
getBASE64Parameter( param )
Decodes a Base64-encoded get-type parameter, and returns the result in JSON.
Parameter
nametyperequireddescription
paramStringNParameter specified in URI
Return
typedescription
StringParameter string
Sample
WebSquare.net.getBASE64Parameter("name");
getParameter( param )
Converts a get type parameter into a string.
Parameter
nametyperequireddescription
paramStringNParameter specified in URI
Return
typedescription
StringParameter string
Sample
WebSquare.net.getParameter("name");