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

Class: HTML_AJAX_Action

Source Location: /HTML_AJAX-0.4.0/AJAX/Action.php

Class Overview

HTML_AJAX_Response
   |
   --HTML_AJAX_Action

Helper Class for creating information that can be properly serialized and used by


Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_AJAX_Response

HTML_AJAX_Response::getContentType()
public function getContentType()
HTML_AJAX_Response::getPayload()
public function getPayload()

Class Details

[line 25]
Helper Class for creating information that can be properly serialized and used by

the haaction serializer that eliminates the need for php users to write javascript for dealing with the information returned by an ajax method - instead the javascript is basically created for them



[ Top ]


Class Variables

$contentType =  'application/html_ajax_action'

[line 32]

about
  • Var: type

Type:   $contentType
Overrides:   Array


[ Top ]



Method Detail

appendAttr   [line 65]

void appendAttr( $id, $attribute, [ $data = NULL])

public function appendAttr()

adds $data to the beginning of the attribute in the item identified by $id ($id can also be a class)


Parameters:

   $id   — 
   $attribute   — 
   $data   — 

[ Top ]

assignAttr   [line 85]

void assignAttr( $id, $attribute, [ $data = NULL])

public function assignAttr()

assigns $data to the value of the attribute in the item identified by $id ($id can also be a class) if attribute already exists, the entire value of the attribute will be replaced


Parameters:

   $id   — 
   $attribute   — 
   $data   — 

[ Top ]

clearAttr   [line 104]

void clearAttr( $id, $attribute)

public function clearAttr()

removes an attr from the item identified by $id ($id can also be a class)


Parameters:

   $id   — 
   $attribute   — 

[ Top ]

createNode   [line 126]

void createNode( $id, $tag, $attribute, [ $type = 'append'])

public function createNode()

higher level dom manipulation - creates a new node to insert into the dom type can be append, prepend, or insert - for insert id should be the id of the element you're inserting before, for append or prepend should be the id of the element you're inserting into


Parameters:

   $id   — 
   $tag   — 
   $attribute   — 
   $type   — 

[ Top ]

getPayload   [line 209]

void getPayload( )

public function getPayload()

something


Overrides HTML_AJAX_Response::getPayload() (public function getPayload())
[ Top ]

insertAlert   [line 195]

void insertAlert( $data)

public function insertAlert()

adds javascript alert


Parameters:

   $data   — 

[ Top ]

insertScript   [line 181]

void insertScript( $data)

public function insertScript()

adds straight javascript


Parameters:

   $data   — 

[ Top ]

prependAttr   [line 45]

void prependAttr( $id, $attribute, [ $data = NULL])

public function prependAttr()

adds $data to the end of the attribute in the item identified by $id ($id can also be a class)


Parameters:

   $id   — 
   $attribute   — 
   $data   — 

[ Top ]

removeNode   [line 167]

void removeNode( $id)

public function removeNode()

higher level dom manipulation - deletes node from the dom


Parameters:

   $id   — 

[ Top ]

replaceNode   [line 151]

void replaceNode( $id, $tag, $attribute)

public function replaceNode()

higher level dom manipulation - replaces one node with another This can be used to replace a div with a form for inline editing use innerHtml attribute to change inside text


Parameters:

   $id   — 
   $tag   — 
   $attribute   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:38:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.