Class PTHTTPPOSTRequest

Object
   |
   +--PTHTTPRequest
         |
         +--PTHTTPPOSTRequest

class PTHTTPPOSTRequest
extends PTHTTPRequest


Object wrapper for "in-place" client-server POST operations. Invoking a PTHTTPPOSTRequest will cause a background HTTP request to be sent to the server without reloading the contents of the browser. PTHTTPPOSTRequests can be set to automatically refresh the inner HTML of an element on the page, or to have the HTTP response that they generate be handled by a JavaScript function. All the form input values (with the exception of file inputs) will be transmitted in the PTHTTPPOSTRequest.

Usage:	
 	// refresh the content of an element
 	var myform = document.forms[0];
	var request = new PTHTTPPOSTRequest(myform.action, myform, document.getElementById('refresh-elem-id'));
	request.setRequestHeader('my-custom-header', 'headervalue');	
	request.invoke();
 
 OR
 	// invoke a response handling function
 	var myform = document.forms[0];
	function handleResponse(resp) { alert(resp.responseText); }	
	var request = new PTHTTPPOSTRequest(myform.action, myform, handleResponse);
	request.invoke();
 

Defined in PTXML.js


Field Summary
<static>  <final> Object VERSION
          
   
Fields inherited from class PTHTTPRequest
responsePreProcHandler, responsePostProcHandler
 
Constructor Summary
PTHTTPPOSTRequest (url, formContent, responseHandler, concurrencyMode, properties)
            Creates a new "in-place" client-server POST request
 
Method Summary
 void setFormContent(formContent)
           Sets the form content for the request.
 
Methods inherited from class PTHTTPRequest
setResponseHandler, setRequestHeader, invoke
 

Field Detail

VERSION

<static> <final> Object VERSION

Constructor Detail

PTHTTPPOSTRequest

PTHTTPPOSTRequest(url, formContent, responseHandler, concurrencyMode, properties)

Method Detail

setFormContent

void setFormContent(formContent)


Documentation generated by JSDoc on Wed Aug 24 10:17:38 2005