[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/pear/HTML/AJAX/ -> Helper.php (summary)

HTML/JavaScript Generation Helper SVN Rev: $Id: Helper.php,v 1.1.2.1 2008/10/03 07:09:51 nicolasconnault Exp $

Author: Joshua Eichorn <josh@bluga.net>
Copyright: 2005 Joshua Eichorn
License: http://www.opensource.org/licenses/lgpl-license.php LGPL
Version: Release: 0.5.6
File Size: 186 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTML_AJAX_Helper:: (7 methods):
  setupAJAX()
  loadingMessage()
  updateElement()
  escape()
  encloseInScript()
  jsonEncode()
  isAJAX()


Class: HTML_AJAX_Helper  - X-Ref

HTML/JavaScript Generation Helper

setupAJAX()   X-Ref
Include all needed libraries, stubs, and set defaultServer

return: string

loadingMessage($body, $class = 'HTML_AJAX_Loading', $style = 'position: absolute; top: 0; right: 0; background-color: red; width: 80px; padding: 4px; display: none')   X-Ref
Create a custom Loading message

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

updateElement($id, $update, $type, $enclose = false)   X-Ref
Update the contents of an element using ajax

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

escape($input)   X-Ref
Escape a string and add quotes allowing it to be a javascript paramater

param: string    $input
return: string

encloseInScript($input)   X-Ref
Enclose a string in a script block

param: string    $input
return: string

jsonEncode($input)   X-Ref
Generate a JSON String

param: string    $input
return: string

isAJAX()   X-Ref
Check the request headers to see if this is an AJAX request

return: boolean



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7