Html

Response full html snippets with the Factory::getResponseInstance()->html('htmlElementId', 'Content that response back' );

Insert/Replace the Content (innerHTML)

Factory::getResponseInstance()->html('htmlElementId', 'Content that response back');

Remove the Content (innerHTML)

Factory::getResponseInstance()->html('htmlElementId');

Factory::getResponseInstance()->html('htmlElementId', '');

Html Schematic

// needs only at first if this file is an single file or the first file where the request was send!
require_once __DIR__ . '/bootstrap.php';

use Jybrid\Factory;

set_error_handler('\Jybrid\Errors\Handler::addError');
Factory::getInstance()->getConfig()->setExitAllowed(true);
$xScripts = Factory::getScripts()->getConfiguration()->setDeferScriptGeneration(false);

// Creating the Request Command to the browser as GET
$jybridCmsGET = Jybrid\Plugins\Cms\Plugin::getRequest('testing_get', ['method' => 'GET']);

if (Factory::isCmsRequest())
{
    // simple response an random string
    Factory::getResponseInstance()->html('myContent', md5((string) random_int(1, 100)));
}

Factory::processRequest();
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Html Response | jybrid schematic</title>
    <?php echo \Jybrid\Scripts\Generator::generateClientScript(); ?>
</head>

<body>
<h2><a href="schematic.php">jybrid schematic</a></h2>
<h3>jybrid html response <a href="https://jybrid.com/ajax-response/html">https://jybrid.com/ajax-response/html</a></h3>
<hr>

<p id="myContent">Target Area</p><br/>
<p><a href="#0" onclick="<?php echo $jybridCmsGET->getButtonScript() ?>">Set Content</a></p>
</body>
</html>

As Jybrid-script jybrid.html()

Also you can use jybrid.html('id','string') in your javascript files like in other javascript-frameworks

old xajax was xajax.assign()

 xajax.assign('html_id','innerHTML','your content/ html content');

Ajax Remove Element

Removing html-node via ajax Response

Factory::getResponseInstance()->remove('element');

As Jybrid-script jybrid.remove()

jybrid.remove('html_id');

Ajax Remove Elements

Removing html-node via ajax Response

Factory::getResponseInstance()->removeAll('querySelectorString');

As Jybrid-script jybrid.removeAll('querySelectorString')

jybrid.removeAll('querySelectorString')

further reading ajax examples

@see simple schematic schematic-html.php

@see complex example html-response.php