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

Class: HTML_AJAX_Helper

Source Location: /HTML_AJAX-0.2.4/AJAX/Helper.php

Class Overview


HTML/JavaScript Generation Helper


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 Joshua Eichorn

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 24]
HTML/JavaScript Generation Helper


[ Top ]


Class Variables

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

[line 36]

JS libraries to include

Type:   array


[ Top ]

$serverUrl =  'server.php'

[line 29]

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

Type:   mixed


[ Top ]



Method Detail

encloseInScript   [line 109]

string encloseInScript( string $input)

Enclose a string in a script block

Parameters:

string   $input   — 

[ Top ]

escape   [line 99]

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

Parameters:

string   $input   — 

[ Top ]

loadingMessage   [line 58]

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

Create a custom Loading message

Parameters:

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 43]

string setupAJAX( )

Include all needed libraries, stubs, and set defaultServer

[ Top ]

updateElement   [line 72]

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

Update the contents of an element using ajax

Parameters:

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 Mon, 11 Mar 2019 14:11:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.