CodeIgniter Forums
changing an element in the dom - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: changing an element in the dom (/showthread.php?tid=69688)



changing an element in the dom - richb201 - 01-05-2018

I have a page where I want to change the text in the blue box from NONE to something else. I am using grocery crud and codeigniter simplicity. 


$output = $crud->render();
$dom=new DOMDocument();
$dom->loadHTML($output->output);
$dom->validateOnParse = true;
$img_nodes=$dom->getElementById('myCamp');
$this->_configure_output($output)


My plan was to search through the HTML of the DOM and then modify the text of the HTML before output. But it seems that when I search ById, the $Output doesn't have the "Active Campaign:NONE" prepended to it yet.I guess it gets add somewhere in _configure_output. But I don't want to modify the core code. 

Is there a better way to do this?