Print Page | Close Window

Updating/Modifying posted content with RTE

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=19942
Printed Date: 29 March 2026 at 9:20am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Updating/Modifying posted content with RTE
Posted By: SamanthaMarrs
Subject: Updating/Modifying posted content with RTE
Date Posted: 19 May 2006 at 4:40am
Ok, so far, have had very limited issues with this RTE that I couldn't solve.
But this one kinda confuses me, so any thoughts would be greatly appreciated.
 
I'm basically using an ASP form that works like the guestbook tutorial from this site. The data put into the initial RTE gets posted into an access database and is displayed on another page. There are 3 things, Add Entry, Delete Entry, and Modify Existing Entry. I would like to use the RTE in the "Modify Entry" page, but am having trouble figuring out how to post the entry data from the database into the RTE for modification.
 
As it was i just used the "value="<% = rsGuestbook("Comments") %>"" in the <textarea> field. But as we know by now, that won't work, cuz only the html from the entry will show.
 
Is this possible?
 
Thanks in advance!



Replies:
Posted By: WebWiz-Bruce
Date Posted: 19 May 2006 at 9:43am
The way you are doing using the textarea is down the right path, just implemented slightly wrong:-

<textarea><% = rsGuestbook("Comments") %></textarea>

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: SamanthaMarrs
Date Posted: 19 May 2006 at 2:44pm
Hmm, tried this out, and still just getting html inside the text area
 
 
<TEXTAREA NAME="comments" style="width:500; height:300"><% = rsGuestbook("Comments") %></TEXTAREA>
 
so you can view:
 
http://www.bentoakcs.com/samsasp/update_form.asp?ID=5 - http://www.bentoakcs.com/samsasp/update_form.asp?ID=5


Posted By: WebWiz-Bruce
Date Posted: 19 May 2006 at 2:54pm
The problem is that your RTE area is not initialising and you are just getting a plain textarea.

Looking at the code it appears that for the HTML form area you do not have an id tag nor for the comments textarea eg. id="myFormName"

This maybe why your RTE area is not initialising.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: SamanthaMarrs
Date Posted: 19 May 2006 at 2:57pm
oh poopy, i have found the culprit. i did nopt add the onLoad="initialiseWebWizRTE();" in the <body>, duh. lol, thanks very much borg for your help, you are genius ;)


Posted By: OURJETS
Date Posted: 27 June 2006 at 5:15pm
Samantha,
 
I am struggling with using RTE to allow a user to post and update his page. Can you offer any assistance? I have a blank text area that I want the user (through a password protected page) to populate himself. RTE looks like the perfect medium to do this but I cannot get it to work. Is is possible to do without using a database?
 
Many thanks,
ourjets 


Posted By: dpyers
Date Posted: 27 June 2006 at 9:47pm
Just use the ret to edit the same text file all of the time and on the page, use an include statement to pull the text file in to whereever you want to display it,

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: OURJETS
Date Posted: 28 June 2006 at 9:00am
Dpyer,
 
Very new to asp. Where does the include statement need to be? Can you offer further guidance in more detail?
 
 
Thanks.
 
Ourjets


Posted By: dpyers
Date Posted: 29 June 2006 at 12:51am
Actually, I was thinking of a type of server-side include (SSI) called an html include.
Basically, you use the rte to maintain a file that contains content that you want to include in the html page. This leaves your headers, footers, and other content alone. The only thing the user can edit is what you allow them to edit.

There are two formats for an html include statement:
<!--#include virtual="/directory/included.html" -->
<!--#include file="included.html" -->
The first one points to a file path from the root of your web site. It's useful because you can use the same include statementt anywhere on your site.
The second points to a file relative to the file you are including it in. It's a little faster, but to use the file in pages located in different directories, you would have to change the path in the include statement for each directory it was called from.

HTML imcludes are useful for including pieces of content in certain places on a page. You wouldn't want to include a whole page within another page (Both pages would have html, header, and body tags. When displayed on one page, the html gets hosed and blows search engine minds.).

To include a whole page within another page, you would use an iframe. But that's another search-engine breaker.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: OURJETS
Date Posted: 29 June 2006 at 10:53am
dpyers,
 
I'm lost! At the moment I have two html pages:
 
The first page is the page where I want the "posted" information from RTE to be displayed.
 
The second is the page where a user accesses the RTE (via server side password protection) to put what ever he wants to put on the site.
 
Which file do I add #include file="mydisplaypage.html" to load up the RTE output? Or am I doing this completely wrong.
 
Cheers,
Ourjets 


Posted By: dpyers
Date Posted: 29 June 2006 at 7:18pm
You'd put the include statement in the page you want the information displayed in.

The page with the rte needs to
1. Load mydisplaypage,html into the rte when the edit page loads.
2. Save mydisplaypage.html

Note: some hosts only allow pages with the extension .shtml to be used in inclyde statements.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: OURJETS
Date Posted: 29 June 2006 at 9:38pm
Dear dpyers,
 
Not having much luck.
 
This is what I get at my RTE page http://www.fightforce.co.uk/html/eventsrte.asp - http://www.fightforce.co.uk/html/eventsrte.asp
 
The HTML is shown here .......... sorry I've listed it all. I've highlighted the bits I think are needed in red. Do I need an "action" in blue
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>EventsRTE</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="NetObjects Fusion 8 for Windows">
<script>
<!--
function F_loadRollover(){} function F_roll(){}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="../assets/rollover.js"></SCRIPT>
<link rel=stylesheet type="text/css" href="../html/style.css">
<link rel=stylesheet type="text/css" href="../html/site.css">
<style>
</style><nolayer>
<style id="NOF_STYLE_SHEET">
<!--
-->
</style>
</nolayer>
</head>
<body NOF="(MB=(DefaultMasterBorder, 85, 60, 154, 10), L=(EventsRTELayout, 582, 521))" onLoad="initialiseWebWizRTE();" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
 <table cellpadding=0 cellspacing=0 border=0 width=729 nof=ly>
  <tr valign=top align=left>
   <td>
    <table border=0 cellspacing=0 cellpadding=0 width=18 nof=ly>
     <tr valign=top align=left>
      <td width=8 height=125><img src="../assets/images/autogen/clearpixel.gif" width=8 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td height=10></td>
      <td width=10></td>
     </tr>
    </table>
   </td>
   <td>
    <table border=0 cellspacing=0 cellpadding=0 width=711 nof=ly>
     <tr valign=top align=left>
      <td width=136 height=10><img src="../assets/images/autogen/clearpixel.gif" width=136 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td height=75></td>
      <td width=575><img id="Banner1" height=75 width=575 src="../assets/images/autogen/EventsRTE_Nbanner.gif" border=0 alt="EventsRTE" title="EventsRTE" NOF=B_H></td>
     </tr>
    </table>
    <table border=0 cellspacing=0 cellpadding=0 width=704 nof=ly>
     <tr valign=top align=left>
      <td width=136 height=7><img src="../assets/images/autogen/clearpixel.gif" width=136 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td height=501></td>
      <td width=568>
       <form name="events" action="" METHOD=POST>
        <table border=0 cellspacing=0 cellpadding=0 width=561 nof="LayoutRegion1">
         <tr valign=top align=left>
          <td width=244 height=19><img src="../assets/images/autogen/clearpixel.gif" width=244 height=1 border=0 alt=""></td>
          <td></td>
          <td width=247><img src="../assets/images/autogen/clearpixel.gif" width=247 height=1 border=0 alt=""></td>
         </tr>
         <tr valign=top align=left>
          <td height=454 colspan=3 width=561><%
 'ID tag name of the HTML form the textarea is within
 strFormName = "events"
 
 'ID tag name of HTML textarea being replaced
 strTextAreaName = "FormsMultiLine1"
 
 %>
 <!-- include the Web Wiz Rich Text Editor -->
 <!--#include file="RTE/RTE_editor_inc.asp" -->
<textarea WRAP=PHYSICAL id="Forms Multi-Line1" name="FormsMultiLine1" rows=28 cols=68></textarea></td>
         </tr>
         <tr valign=top align=left>
          <td colspan=3 height=4></td>
         </tr>
         <tr valign=top align=left>
          <td height=24></td>
          <td width=70><a href="javascript:document.Events.submit()"><input type=submit name="FormsButton1" value="Submit" id="Forms Button1"></td>
          <td></td>
         </tr>
        </table>
       </form>
      </td>
     </tr>
    </table>
    <table border=0 cellspacing=0 cellpadding=0 nof=ly>
     <tr valign=top align=left>
      <td width=142 height=22><img src="../assets/images/autogen/clearpixel.gif" width=142 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td></td>
      <td width=560 nof="NB_FYHTNN120" class="TextNavBar" style="text-align: center;">[EventsRTE]</td>
     </tr>
    </table>
    <table border=0 cellspacing=0 cellpadding=0 width=634 nof=ly>
     <tr valign=top align=left>
      <td width=210 height=19><img src="../assets/images/autogen/clearpixel.gif" width=210 height=1 border=0 alt=""></td>
      <td width=424><img src="../assets/images/autogen/clearpixel.gif" width=424 height=1 border=0 alt=""></td>
     </tr>
     <tr valign=top align=left>
      <td></td>
      <td width=424 class="TextObject">
       <p style="text-a


Posted By: WebWiz-Bruce
Date Posted: 30 June 2006 at 9:54am
Your form tag needs an id tag:-

<form name="events" id="events" action="" METHOD=POST>

Your textarea tag has the id property with the worng name, you have a space in Forms Muti-line1 also having a dash - is not good, chnage this to:-

<textarea id="FormsMultiLine1" name="FormsMultiLine1" rows=28 cols=68></textarea>

Also remove the wrap=physical, as this will course issue.




-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: OURJETS
Date Posted: 07 July 2006 at 8:43pm

Help again!

I seem to be really struggling here. I have started again from scratch and taken your advice from the last post regarding form names ID tags etc.
 
However, I do not see the RTE editor - just white space ..... When I press submit the page seems to reload, but where is the editor? 
 
Please see http://www.fightforce.co.uk/html/eventsrte.asp - http://www.fightforce.co.uk/html/eventsrte.asp
 
to see what I mean.
 
The page HTML is as follows:
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>EventsRTE</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="NetObjects Fusion 8 for Windows">
<script>
<!--
function F_loadRollover(){} function F_roll(){}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="../assets/rollover.js"></SCRIPT>
<link rel=stylesheet type="text/css" href="../html/style.css">
<link rel=stylesheet type="text/css" href="../html/site.css">
<style>
</style><nolayer>
<style id="NOF_STYLE_SHEET">
<!--
-->
</style>
</nolayer>
</head>
<body NOF="(MB=(DefaultMasterBorder, 85, 60, 154, 10), L=(EventsRTELayout, 582, 521))" onLoad="initialiseWebWizRTE();" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
 <table cellpadding=0 cellspacing=0 border=0 width=729 nof=ly>
  <tr valign=top align=left>
   <td>
    <table border=0 cellspacing=0 cellpadding=0 width=18 nof=ly>
     <tr valign=top align=left>
      <td width=8 height=125><img src="../assets/images/autogen/clearpixel.gif" width=8 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td height=10></td>
      <td width=10></td>
     </tr>
    </table>
   </td>
   <td>
    <table border=0 cellspacing=0 cellpadding=0 width=711 nof=ly>
     <tr valign=top align=left>
      <td width=136 height=10><img src="../assets/images/autogen/clearpixel.gif" width=136 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td height=75></td>
      <td width=575><img id="Banner1" height=75 width=575 src="../assets/images/autogen/EventsRTE_Nbanner.gif" border=0 alt="EventsRTE" title="EventsRTE" NOF=B_H></td>
     </tr>
    </table>
    <table border=0 cellspacing=0 cellpadding=0 width=699 nof=ly>
     <tr valign=top align=left>
      <td width=144 height=28><img src="../assets/images/autogen/clearpixel.gif" width=144 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td height=346></td>
      <td width=555>
       <form name="rte" id="rte" action="" METHOD=POST>
        <table border=0 cellspacing=0 cellpadding=0 width=537 nof="LayoutRegion1"
>
         <tr valign=top align=left>
          <td width=8 height=36><img src="../assets/images/autogen/clearpixel.gif" width=8 height=1 border=0 alt=""></td>
          <td width=201><img src="../assets/images/autogen/clearpixel.gif" width=201 height=1 border=0 alt=""></td>
          <td></td>
          <td width=258><img src="../assets/images/autogen/clearpixel.gif" width=258 height=1 border=0 alt=""></td>
         </tr>
         <tr valign=top align=left>
          <td height=262></td>
          <td colspan=3 width=529>
<%
'ID tag name of the HTML form the textarea is within
 strFormName = "rte"
 
'ID tag name of HTML textarea being replaced
 strTextAreaName = "rte"
 
%>
 <!-- include the Web Wiz Rich Text Editor -->
 <!--#include file="RTE/RTE_editor_inc.asp" -->
<textarea id="rte" name="rte" rows=16 cols=64></textarea></td>
         </tr>
         <tr valign=top align=left>
          <td colspan=4 height=7></td>
         </tr>
         <tr valign=top align=left>
          <td colspan=2 height=24></td>
          <td width=70><input type=submit name="FormsButton1" value="Submit" id="Forms Button1"></td>
          <td></td>
         </tr>
        </table>
       </form>
      </td>
     </tr>
    </table>
    <table border=0 cellspacing=0 cellpadding=0 nof=ly>
     <tr valign=top align=left>
      <td width=142 height=156><img src="../assets/images/autogen/clearpixel.gif" width=142 height=1 border=0 alt=""></td>
      <td></td>
     </tr>
     <tr valign=top align=left>
      <td></td>
      <td width=560 nof="NB_FYHTNN120" class="TextNavBar" style="text-align: center;">[EventsRTE]</td>
     </tr>
    </table>
 &nb


Posted By: WebWiz-Bruce
Date Posted: 07 July 2006 at 8:52pm
You can't give the same ID's to different items on the page.

You have given both your form and the textarea the ID of 'RTE' this will not work as ID tags need to be unique for each individual item within an HTML document.

The submit tag also needs the name and ID of 'Submit'


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net