I currently have a PHP project that uses the Zend Framework. When a user clicks a button, I am using a partial to get the HTML that needs to be added to the page. The problem is that the HTML seems to be returned as HTML rather than a string:
document.getElementById("active_projects").innerHTML='<?php echo $this->partial("project/project/activeprojectstable.phtml", array(
"headers" => $headers,
"active" => $this->active
))?>';
.innerHTML =
takes a string, but the HTML has new lines and special characters that it does not accept. How can I convert the HTML to a valid HTML string?
Update:
For a better idea of the HTML being produced by the partial that is causing the issues, this is what it evaluates to: