Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have developed UI page which shows a dynamic html table. The table has "Edit" and "Save" functionality which means users can edit the Row details and Save it.
Here is my problem statement:
Once any user makes an Edit and Saves it , the new Saved data should be notified to other users as well. How can i achieve this(I can't use DB to save the data because of some constraints).
I have tried to open up a new mail popup with window.open , but the html table is showing up compelete HTML tags in the mail body part, here is the content of the new mail popup:

<table border="1|1">                    </table><table class="table table-striped">                      <thead>                        <tr class="info">                          <th>Name</th>                          <th>Day</th>                          <th>Date</th>                          <th>Action</th>                        </tr>                      </thead>           <tbody>                                    <tr>          <td id="name_row">Ramji</td>          <td id="dayRow">Saturday</td>          <td id="Region">USA</td>          <td>            <input type="button" id="edit_button" value="Edit" class="edit" onclick="edit_row()" style="display: block;">            <input type="button" style="display: none;" id="save_button" value="Save" class="save" onclick="save_row(); sendMail();">          </td>          </tr></tbody></table>


What I have tried:

I have tried window.open functionlity to Open up a mail box when the "Save" button is clicked. And this window.open has the html table as parameter in the mail body part.

Here is my code: Online Compiler and Editor/IDE for Java, C/C++, PHP, Python, Perl, etc[^]
Posted
Comments
Richard Deeming 15-Jul-21 4:29am    
If you can't use a database, then where is the data being saved? If you're saving it to local storage, then it won't be available to any other users, so what's the point in telling them?
Sristi Kumari 15-Jul-21 4:34am    
@Richard Deeming, Since this UI will be used by multiple users, i need to notify them. So, i was trying to send a mail on every Edit, but the mail body is not showing the table instead it is showing HTML tags as shown above.
SeeSharp2 15-Jul-21 8:57am    
1. Reply to the comment so that the user will be notified.
2. When sending email you can specify the format to be html and then the user's email program should display the html.
3. I hate to say it but this project sounds like a complete waste of time. If one user makes a change you are going to pop up a window with all of the data and ask the user to email it to others? And then when the others get the email they have to go and make the same changes the first person made. Surely there has to be a better way for what you are doing.
Sristi Kumari 15-Jul-21 9:08am    
@DevParty, Thank you for your response, i get your point.I think DB would be a better way to do this.Need to research on that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900