| Constructor Attributes | Constructor Name and Description |
|---|---|
|
fjajax()
Functional Javascript AJAX caller.
|
|
|
fjajaxh()
Functional Javascript AJAX handler.
|
| Method Attributes | Method Name and Description |
|---|---|
| public |
fjajaxh::__construct()
fjajaxh constructor.
|
| public |
fjajaxh::get_request()
Grabs request info and executes the function that is called.
|
| public |
fjajaxh::html_add($object, $content, $property = ‘innerHTML’)
Postadds content to a property of a HTML object.
|
| public |
fjajaxh::html_push($object, $content, $property = ‘innerHTML’)
Preadds content to a property of a HTML object.
|
| public |
fjajaxh::html_set($object, $content, $property = ‘innerHTML’, $replace = NULL)
Modifies the content of a HTML object’s property.
|
| public |
fjajaxh::js_alert($string, $f = ‘alert’)
Adds an alert.
|
| public |
fjajaxh::js_eval($string)
Sends a string to be evaluated by javascript engine.
|
| public |
fjajaxh::set_response()
Prints the response to the output.
|
Class Detail
fjajaxh()
Make an AJAX request.
<?php include PATH_TO . '/fjajax/php/fjajaxh.php'; $fjajaxh = new fjajaxh(); ?>
Method Detail
public fjajaxh::__construct()
fjajaxh constructor. See fjajax().
public fjajaxh::get_request()
Grabs request info and executes the function that is called.
<?php $fjajaxh->get_request(); ?>
public fjajaxh::html_add($object, $content, $property = ‘innerHTML’)
Postadds content to a property of a HTML object. This means that, if the property will have a value already the action will be: property.value = concat(property.value, content)
<?php
$fjajaxh->html_add('dummy_object', 'dummy_text_post');
?>
- Parameters:
- string object
- Name of the HTML Object
- string content
- Content to add/set to the HTML Object’s property
- string property
- Name of the HTML Object’s property. Default: innerHTML.
public fjajaxh::html_push($object, $content, $property = ‘innerHTML’)
Preadds content to a property of a HTML object. This means that, if the property will have a value already the action will be: property.value = concat(content, property.value)
<?php
$fjajaxh->html_push('dummy_object', 'dummy_text_pre');
?>
- Parameters:
- string object
- Name of the HTML Object
- string content
- Content to add/set to the HTML Object’s property
- string property
- Name of the HTML Object’s property. Default: innerHTML.
public fjajaxh::html_set($object, $content, $property = ‘innerHTML’, $replace = NULL)
Modifies the content of a HTML object’s property.
<?php
// this will set innerHTML to 'dummy_text'
$fjajaxh->html_set('dummy_object', 'dummy_text');
// this will act as fjajaxh::html_push
$fjajaxh->html_set('dummy_object', 'dummy_text_pre', '+innerHTML');
// this will act as fjajaxh::html_add
$fjajaxh->html_set('dummy_object', 'dummy_text_post', 'innerHMLT+');
// this will remove all 'dummy_' texts in innerHTML property with void
$fjajaxh->html_set('dummy_object', '', 'innerHTML', '/dummy_/i');
?>
- Parameters:
- string object
- Name of the HTML Object
- string content
- Content to add/set to the HTML Object’s property
- string property
- Name of the HTML Object’s property. Default: innerHTML.
- string property
- Name of the HTML Object’s property. Default: innerHTML.
public fjajaxh::js_alert($string, $f = ‘alert’)
Adds an alert.
<?php
$fjajaxh->js_alert('This is an alert.');
?>
- Parameters:
- string string
- The message you want to send.
- string f
- Name of the function used to send the message. Default is Javascript function: alert.
public fjajaxh::js_eval($string)
Adds an alert.
<?php
$fjajaxh->js_eval('var test = "A test";');
?>
- Parameters:
- string string
- Javascript string sent to be evaluated.
public fjajaxh::set_response()
Prints the response to the output.
<?php $fjajaxh->set_response(); ?>




English