Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Nikhil_46's avatar

Send HTML Table To Email From Webpage

Hello,

I Want To Share HTML Table Via Email, Just The Table Is Created Dynamic & It Is On Webpage & Just Below That Table I Have Created One Share Button, Where User Will Fill His/Her Email Id & Submit That Form, After Submitting Of That Form, Email Will Contain That Table With Was Visible On That Webpage

  1. How I Can Make That Table Sharable? => I Have Used Jquery To Share That HTML Table Via Email, I Have Used .html() To Get That Entire Table

  2. That Table Contain Some Link, & I Have To Shared That Linked Too, Via Email Problem => Link Was Generated Via Javascript Function (onClick)

What Will Be The Best Way To Get These Things Done In Smooth Maner?

0 likes
9 replies
Sinnbeck's avatar

It sounds like you already have a solution?

I Have Used Jquery To Share That HTML Table Via Email, I Have Used .html() To Get That Entire Table

Which part are you struggling with?

Nikhil_46's avatar

@Sinnbeck I Am Getting That The Entire Table, But That Onclick Function Will Not Work I Know, But I Want That Link Too Working On That Email, As User Clicks On That Link Via Email, Email Should Work In Same Way As It Is Working In Webpage.

Nikhil_46's avatar

Basically, He Should Redirect To That Link With Functionality Which Was Perform On That Onclick Function

Sinnbeck's avatar

You cannot use onclick. You need actual links in the mail, with the full url

Nikhil_46's avatar

@Sinnbeck Basically Link Was Generated Using Javascript, It Is Working Like Filter Where The User Can Select Any Link & After Clicking On That Link That Table Get Updated Accordiy

It Is An Filter For The Location Login Part Executing On That onClick Function

OI Email That Link Is Highlighted But When I Click On That Link It Should Redirect To That Page With That Filter That User Has Selected.

Sinnbeck's avatar

@Nikhil_46 Then you need to write some code to chance that to a working link with those filters as part of the url. As I have seen nothing of your code or output I cannot really say how

Sinnbeck's avatar

@Nikhil_46 Sorry no. I help out here along with other people so everyone can add in. If I was to do 1-1 sparring on a problem I would need to be paid for that, but I dont currently do freelance work :)

But perhaps show what you have and we can see if we can help

Please or to participate in this conversation.