I have a table where I have the lines:
$crud->add_action('Snapshot', '', 'Configure/snapshot', 'Select');
$output = $crud->render();
My function called snapshot:
public function snapshot($post_array, $primary_key)
{
echo '<script> window.postMessage({ type: "FROM_PAGE_TO_CONTENT_SCRIPT",text: "Hello from the webpage!" }, "*");</script>';
}
Snapshot uses javascript to write a message out to a content script. I thought that after snapshot() runs, I would not even redraw the crud. But the crud blanks out the page. Any idea how I can get snapshot to run without affecting the UI?