Advanced HTML Editor 2 Support Product Page

This topic was archived

Problem Retrieving data from database

Reported 12 Dec 2004 15:47:03
1
has this problem
12 Dec 2004 15:47:03 Harold Rau posted:
I am using multiple editors on a page with HTML Editor 2 and MX2004 Update Server Behavior. If I have just one editor on the page it works fine but when I add more textarea editors the content in each text area is stored ok in the database fields and is displays properly on a page viewing the html content in the database however, when I try to re-edit the content already in the database all the data from all the fields including that in editor1 is erased. The "Title" field, (chan_one_title) returns ok

Here is the code for one of the editor fields.

<table width="400" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFfff"><tr><td bgcolor="326698"><h3>Title: <input name="chan_one_title" type="text" value="<%=(Recordset1.Fields.Item("Chan_one_title".Value)%>" size="25" maxlength="100">
</h3></td></tr>
&lt;tr&gt;&lt;td&gt;&lt;table class="tabl" width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="5" align="center"&gt;&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="editor1" name="editor1" toolbar="T:BIU;E:BU;J:LCRF;O:LUOI;C:F;X<img src=../images/dmxzone/forum/icon_smile_kisses.gif border=0 align=middle>HLICWM" config="mw:200;mh:200;upload:asp;upfolder:images_uploaded;resize:true" style="width:400px;height:250px"&gt;&lt;%=(Recordset1.Fields.Item("Chan_one_Content".Value)%&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;
&lt;table width="400" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFfff"&gt;
&lt;tr&gt;&lt;td bgcolor="326698"&gt;&lt;h3&gt;Title:&nbsp;&lt;input name="chan_two_title" type="text" size="50" maxlength="65" value="&lt;%=(Recordset1.Fields.Item("Chan_two_title".Value)%&gt;"&gt;&lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table class="tabl" width="100%" border="0" cellspacing="0" cellpadding="5" align="center"&gt;&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="editor2" name="editor2" toolbar="T:BIU;E:BU;J:LCRF;O:LUOI;C:F;X<img src=../images/dmxzone/forum/icon_smile_kisses.gif border=0 align=middle>HLICWM" style="width:400px;height:250px" config="mw:200;mh:200;upload:asp;resize:true"&gt;&lt;%=(Recordset1.Fields.Item("Chan_two_Content".Value)%&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

I get no error messages of any kind. This an urgent need as I need to get this page working as soon as possible. If you need more information or access to the site, let me know.

Replies

Replied 14 Dec 2004 14:49:25
14 Dec 2004 14:49:25 Harold Rau replied:
The text information (HTML code) gets stored ok in the database field but when I return to the edit page the field is blank even tho there is data in the recordset field. There are nine textareas on this page each with its own editor. The editors are now named the same as the data field "Chan_Number_Content"
I have another page setup with two editors on the page and it works fine.
HELP!!!
Replied 20 Dec 2004 12:53:59
20 Dec 2004 12:53:59 Camillah Ringes replied:
Hi Harold,

Try using complete differnet names for the editors. During testing I expirienced the same kind of problems. When renaming the editors everything worked correctly. ??
So 'editor1', 'editor2', 'editor3' didn't work out, but 'firsteditor', 'secondeditor' etc.. did.
I'm not sure why this happens.

Regards,
Camillah

--------------------------------------------------
Camillah Ringes
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 20 Dec 2004 13:25:59
20 Dec 2004 13:25:59 Harold Rau replied:
Thanks for your response Camillah.

I have tried changing the names of the editors to the same name as the database field they store and retrive the data from and to something different like "editorChan_one_content" but I still can't get it to display the data in the SQL database field. The editor works fine on one page with three editors on the page but does not work on another page where I have 9 editors. Although it stores the html content correctly in the db it hangs up on retriving the data back to re-edit for some reason. I am using the "update" server behavior.

Also, is there some way to cache the button images. Each time I bring up the page all of these are downloaded again.
If you want access to the actual pages, e-mail me and I will allow you access.

Regards,
Harold
Replied 22 Dec 2004 14:53:16
22 Dec 2004 14:53:16 Harold Rau replied:
I have spent hours and hours trying to get multiple content editors to work on my pages. <img src=../images/dmxzone/forum/icon_smile_angry.gif border=0 align=middle>
I can get multiple editors to work but if I put a form field between the editors they no longer work.
This works: (content is stored and retrived back in all three editors)
&lt;table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFfff"&gt;&lt;tr&gt;&lt;td bgcolor="326698"&gt;&lt;h3&gt;Title:&nbsp;&lt;input name="chan_one_title" type="text" size="20" maxlength="100" value="&lt;%=(Recordset1.Fields.Item("Chan_one_title".Value)%&gt;"&gt;
&lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="firsteditor" name="firsteditor" style="width<img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>x;height:250px" toolbar="T:BIU;E:BU;J:LCRF;O:LUOI;C:F;X<img src=../images/dmxzone/forum/icon_smile_kisses.gif border=0 align=middle>HLICFWM" config="mw:200;mh:200;upload:asp;resize:true"&gt;&lt;%= Trim((Recordset1.Fields.Item("Chan_one_Content".Value)) %&gt;&lt;/textarea&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor="#326698"&gt;&lt;h3&gt;Title:&nbsp; &lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="secondeditor" name="secondeditor" style="height:250px"&gt;&lt;%= Trim((Recordset1.Fields.Item("Chan_four_Content".Value)) %&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor="#326698"&gt;&lt;h3&gt;Title:&nbsp; &lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="thirdeditor" name="thirdeditor" style="height:250px"&gt;&lt;%=(Recordset1.Fields.Item("Chan_three_Content".Value)%&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

This does not work-no content is retrived back from the SQL database in secondeditor or third editor

&lt;table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFfff"&gt;&lt;tr&gt;&lt;td bgcolor="326698"&gt;&lt;h3&gt;Title:&nbsp;&lt;input name="chan_one_title" type="text" size="20" maxlength="100" value="&lt;%=(Recordset1.Fields.Item("Chan_one_title".Value)%&gt;"&gt;
&lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="firsteditor" name="firsteditor" style="width<img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>x;height:250px" toolbar="T:BIU;E:BU;J:LCRF;O:LUOI;C:F;X<img src=../images/dmxzone/forum/icon_smile_kisses.gif border=0 align=middle>HLICFWM" config="mw:200;mh:200;upload:asp;resize:true"&gt;&lt;%= Trim((Recordset1.Fields.Item("Chan_one_Content".Value)) %&gt;&lt;/textarea&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor="#326698"&gt;&lt;h3&gt;Title:&nbsp; &lt;input name="chan_four_title" type="text" value="&lt;%=(Recordset1.Fields.Item("Chan_four_title".Value)%&gt;" size="20" maxlength="100"&gt;
&lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="secondeditor" name="secondeditor" style="height:250px"&gt;&lt;%= Trim((Recordset1.Fields.Item("Chan_four_Content".Value)) %&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor="#326698"&gt;&lt;h3&gt;Title:&nbsp; &lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left"&gt;&lt;textarea dmxedit="true" id="thirdeditor" name="thirdeditor" style="height:250px"&gt;&lt;%=(Recordset1.Fields.Item("Chan_three_Content".Value)%&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

I need some answers on this very quickly. My deadline for having this working is in four days!!!
Replied 23 Dec 2004 16:40:18
23 Dec 2004 16:40:18 Camillah Ringes replied:
Hi Harold,

Did you try to name the editor with complete different names like I explained in my former post?
Chan_four_Content, Chan_three_Content, are not complete different.

Regards,
Camillah

--------------------------------------------------
Camillah Ringes
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 23 Dec 2004 17:24:14
23 Dec 2004 17:24:14 Harold Rau replied:
Hi Camillah,

Yes I did and it didn't help at all. I tried naming then editor1_content, editor2_content, etc. Is that what you meant to do? If not what do you suggest?
In fact I have tried to separate the content editors by putting them all on one page and the Title text boxes on another page and it still breaks. Seems to be something associated with the SQL database and how the information is pulled back into the page by the server behavior.

UPDATE! I just renamed the editors using the names for the Greek alphabet (alpha, Beta, gamma, etc.) and it breaks at the fourth instance of the editor. While the data is stored in fields beta and gamma it only showing data stored in alpha, delta and eta. I have nine content editors on this page, three rows of three named from left to right by rows.
Any ideas?
Edited by - HRau on 23 Dec 2004 17:28:27

Edited by - HRau on 23 Dec 2004 18:14:20

PROBLEM SOLVED!!
After reading some posts on the Macromedia support forum I found the solution. We are using both Text and varchar fields for titles and content. First of all the poster made the point that you cannot use the "SELECT * " in retriving the data from the recordset. It must be listed out sequencially, field name by field name. First the varchar fields and then the TEXT fields. Also the TEXT fields must be arranged in the recordset in the order that are used in the page. In my case this was by columns top to bottom, left to right. Some manual cut and paste was reguired to get the fields in the right order. When I did this, all nine channels appeared and can be edited independently.
Merry Christmas!

It does take a while for the button images to download, could these be cached somehow?

Edited by - HRau on 24 Dec 2004 03:13:53
Replied 03 Jan 2005 15:39:48
03 Jan 2005 15:39:48 Camillah Ringes replied:
Hi Harold,

Happy new year, and nice to read you found a solution.

Regards,
Camillah



--------------------------------------------------
Camillah Ringes
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------

Reply to this topic