I needed a way to send an email to my site’s visitors with info already generated on screen. In my case it was a dynamically generated table of data. The simplest solution for me was to grab the entire table’s html code and using ajax to post it to a PHP script which will send out the email.
I used the following code for getting the html code for a table element with id=”resultsTable” :
1 |
htmlTable=$('#resultsTable').prop('outerHTML'); |