I am trying to send html code using post by the following JavaScript code:
var htmlTable= $('#granting_result').html();
alert(htmlTable);
$('<form action="tbl_create.php" method="POST"><input type="hidden" name="data" value='+htmlTable+' ></form>').submit();
The receiving page tbl_create.php
has the following php code:
<?php
echo $_POST['data'];
?>
The problem is that this page is shown as a blank page and nothing displayed, although the output of alert(htmlTable);
is as following: