Jump to content

Archived

This topic is now archived and is closed to further replies.

xux

Want to implement a preview

Recommended Posts

Hello Everybody,
                      I am working on a newsletter app and i need to implement a preview whereby the newsletter can be previewed before sending it.And I want to send the newsletter with a footer and header.I will apperciate any help(quite urgent).Thanks

Share this post


Link to post
Share on other sites
Do you want to send it as plain text or as HTML (meaning do you want the preview in any of those)?
And when previewed in plain text, do you want to be able to change it before sending?

Ronald   8)

Share this post


Link to post
Share on other sites
Thanks,
          I want it in html and should be able to be modified.Thanks for your help
        xux

Share this post


Link to post
Share on other sites
Best thing would be to read in the html and display it in a textarea box assigned to an editor that can handle HTML tags, such as TinyMce or Whizzywig. Then add a save button and you're ready to send.

Ronald  :cool:

Share this post


Link to post
Share on other sites
Thanks,
          but can I implement my header and footer using this.

Share this post


Link to post
Share on other sites
Yes you can Just concatenate the header, body and footer and display it in the textarea of the editor.
A very short sample of how this works in the Wizzywig editor:
[code]   // just get your header, footer and body text from where you stored it
   $header = .....
   $footer = .....
   $body   = .....
   $formtext = $header . $body . $footer;
?>
   <form action="adm_updt_formtext.php" method="post">
     Click this button to do whatever you want&nbsp;&nbsp;<input type=submit value="Do it ...."><p> </p>
<input type="hidden" name="formact" value="u" />
     <textarea id="formtext" name="formtext" style="width:650px; height:500px"> <?=$formtext;?>
     </textarea>
   </form></body></html>[/code]

Share this post


Link to post
Share on other sites
Thank you very much,let me get down to coding.I will keep you inform,thanks a lot.

Share this post


Link to post
Share on other sites
Since this forum will not let me show JavaScript code in the box, I have sent the complete sample to your private mail address.

Ronald  8)

Share this post


Link to post
Share on other sites
Thanks,
          I need help again.I want to implement a kind of CMS on a site I have design already.Am trying to implement inserting (which I can do) and deleting (which is being problematic) from the database from web interface.Can you help out?thanks

Share this post


Link to post
Share on other sites
If you can insert data into the db from a webform, what is then the problem with deleting from the db from a webform?

Ronald  :cool:

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.