[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Class: HTML_AJAX_Helper

Source Location: /HTML_AJAX-0.5.8/HTML/AJAX/Helper.php

Class Overview

HTML/JavaScript Generation Helper



  • Release: 0.5.8


  • 2005 Joshua Eichorn



Inherited Variables

Inherited Methods

Class Details

[line 26]
HTML/JavaScript Generation Helper

[ Top ]

Class Variables

$combineJsIncludes =  false

[line 48]

Combine jsLibraries into a single require and remove duplicates

Type:   mixed

[ Top ]

$jsLibraries = array('Util','Main','Request','HttpClient','Dispatcher','Behavior','Loading','JSON','iframe')

[line 38]

JS libraries to include

Type:   array

[ Top ]

$serverUrl =  'server.php'

[line 31]

URL where an HTML_AJAX_Server instance is serving up clients and taking ajax requests

Type:   mixed

[ Top ]

$stubs = array()

[line 43]

Remote class stubs to include

Type:   mixed

[ Top ]

Method Detail

encloseInScript   [line 156]

string encloseInScript( string $input)

Enclose a string in a script block


string   $input   — 

[ Top ]

escape   [line 146]

string escape( string $input)

Escape a string and add quotes allowing it to be a javascript paramater
  • Todo: do something here besides a quick hack


string   $input   — 

[ Top ]

isAJAX   [line 178]

boolean isAJAX( )

Check the request headers to see if this is an AJAX request

[ Top ]

jsonEncode   [line 166]

string jsonEncode( string $input)

Generate a JSON String


string   $input   — 

[ Top ]

loadingMessage   [line 105]

void loadingMessage( string $body, [string $class = 'HTML_AJAX_Loading'], [string $style = 'position: absolute; top: 0; right: 0; background-color: red; width: 80px; padding: 4px; display: none'])

Create a custom Loading message


string   $body   —  HTML body of the loading div
string   $class   —  CSS class of the div
string   $style   —  style tag of the loading div

[ Top ]

setupAJAX   [line 55]

string setupAJAX( )

Include all needed libraries, stubs, and set defaultServer

[ Top ]

updateElement   [line 119]

void updateElement( string $id, string|array $update, string $type, [boolean $enclose = false])

Update the contents of an element using ajax


string   $id   —  id of the element to update
string|array   $update   —  Either a url to update with or a array like array('class','method')
string   $type   —  replace or append
boolean   $enclose   — 

[ Top ]

Documentation generated on Thu, 02 Feb 2017 22:30:02 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.