Jump to content


Photo

Want to implement a preview


  • Please log in to reply
9 replies to this topic

#1 xux

xux
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts

Posted 24 August 2006 - 02:51 PM

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

#2 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 24 August 2006 - 03:03 PM

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)
RTFM is an almost extinct art form, it should be subsidized.

#3 xux

xux
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts

Posted 24 August 2006 - 03:16 PM

Thanks,
          I want it in html and should be able to be modified.Thanks for your help
        xux

#4 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 24 August 2006 - 03:24 PM

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:
RTFM is an almost extinct art form, it should be subsidized.

#5 xux

xux
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts

Posted 24 August 2006 - 04:28 PM

Thanks,
          but can I implement my header and footer using this.

#6 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 24 August 2006 - 06:11 PM

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:
   // 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>

RTFM is an almost extinct art form, it should be subsidized.

#7 xux

xux
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts

Posted 25 August 2006 - 03:27 PM

Thank you very much,let me get down to coding.I will keep you inform,thanks a lot.

#8 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 25 August 2006 - 05:16 PM

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)
RTFM is an almost extinct art form, it should be subsidized.

#9 xux

xux
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts

Posted 28 August 2006 - 05:30 PM

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

#10 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 28 August 2006 - 07:25 PM

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:
RTFM is an almost extinct art form, it should be subsidized.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users