I currently have a 2010 web form application that generates html code when the application has finished executing. My requirement is that I make a second copy of the same html so a new letter can be generated. The only difference from letter #1 to letter #2 is the mailing address of the letters will be different. The rest of the letter will be exactly the same.
My problem is when I actually have a copy of the letter, I have it completely. I do not have a copy of what the original address is. Thus when I am going to replace the address for the second letter, I need a way to be able to tell where the address of the first letter is located at.
Thus my questions are:
1. Thus I am thinking I can place some invisible characters around the first address that the user will not see. This way I will be able to replace the address in the second copy of the letter with the second address I want to embed. Thus are there invisible html characters that I can embed around address 1 in the first letter so that I can place a new address in the second copy of the letter? If so can you tell me what those invisible characters are that I can use?
2. If there are no invisible characters that I can use, are there other html tags that I can use to place around the original address that the user will not see? Thus when I am working with the second copy of the letter, I can do the search and replace for these other html tags and place the second address in the second letter> Thus can you tell me what the other characters are?
3. If my ideas listed above do not work, do you have any other suggestions that I can Use? If so, would you tell me how to accomplish my goal using your suggestion?
Midhun TpPosted Oct 28, 2016, 12:21 AM
dcPosted Oct 27, 2016, 11:06 AM
I am basically going to take the original letter (stored in html), and make another copy of that letter. I am going to add the copy of the original html to the end. Basically I am going to concatenate (or append) the second html to the original html. Change the address of the copied html and send the modified html to an ssrs report.
I am not familiar withjquery.Would you show me thejquery I would need to replace address 1 with address 2?
Midhun TpPosted Oct 26, 2016, 10:14 PM
How are you making copy of html page?
You can place your address inside a div tag or any tag and give it an id. Then you can replace the text inside that id using jquery.