Hi,

I have a button in a form that calls an AHAH action. Per the documentation for AHAHs, I call drupal_json to return the results. I understand from the drupal_json documentation that drupal_json calls drupal_to_js, the documentation for which explicitly states that HTML is sanitized.

I would like to return some HTML. Is there any way to do that? So far, searching has turned up nothing.

TIA.

Comments

kenuck’s picture

just output your html and then exit your funciton


print drupal_to_js(array('status' => TRUE, 'data' => $output);
exit();

cheers

benjymessner’s picture

Perfect, thanks!