Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using IFrame as preview box 1

Status
Not open for further replies.

kristof

Programmer
Jun 2, 2000
234
BE
Hi all,

I have an email application that sends an html email.
To make sure the content is build correctly, you can see a preview in an Iframe tag. It uses a .htm file that has been written from reading the DB in a previous step.

Now, there are two similar pages like this. Sometimes, the second displays the preview page from the first, but if I send the mail, it sends the correct page.

Any idea what this can be? Probably caching?
 
The problem with writing a static html file to dispay in your iframe is that if you have a large group of people all previewing at the same time, you will prbably be showing them all one poor guys email. If you are not changing the preview as they type, there is no reason you couldn't display the content straight from your ASP. Or if the preview is reflecting changes as they are made, you could have a client-side script that is writing the html to a span's innerHTML attribute so that the preview changes as they are typing and you don't run into caching problems, multiple simultaneous user problems, and so on.

As to your question above,mif the files are being saved with the same name, yes it could be caching, or it could be the first page writing to the file right after the second page so that you see that content instead of the content from the second page.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Thanks for your reply.

The mails will be send by an administrator. Starting with the first, then the second. And he will be the only person who will be sending these mails. And since that person is me ;-), 'multisharing' isn't a problem.

I'll try changing the target .htm filename, as you suggested.

Thx
 
Why not create it with a base name and a random number, pass the filename to the preview page, display it, pass the name to the send page, send the email, delete the file? That way it will never get cached because you would be using semi-unique filenames.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Yep, that was what I was thinking. Anyway, your suggestion made it work so you earn a vote. [thumbsup2]
 
Thanks, anytime. :) ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top