Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - textarea from database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedtextarea from database

 Post Reply Post Reply Page  <12
Author
pablo_montiel View Drop Down
Newbie
Newbie


Joined: 09 December 2004
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote pablo_montiel Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2004 at 7:33am
Please, somebody with some ASP knowledge help me with the code recently posted. I am testing the possibility to use RTE while ADD entries to a db and while EDITING past entries. While ADDING works great, but TO EDIT I canīt SEE on the EDIT PAGE the content from the DB in a Rich text browser.
It works fine with non rich text browsers.

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2004 at 11:30am
It maybe worth waiting for the full version to be released, hopefully next week (time permitting) as I plan to include some tutorials and various examples of how to use the editor, including one that will save and edit to an access database.
Back to Top
cbeaudry View Drop Down
Newbie
Newbie


Joined: 06 May 2004
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cbeaudry Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2004 at 7:46pm
I worked around this issue by assigning session variables in my "add" and "edit" pages. Because I'm using the editor in different parts of my CMS, I could not define the value of strEditorContent in the RTE_textarea.asp file alone. The data for that string had to be able to come from different tables in my database.
 
The workaround requires editing the pages where the forms reside so you need to know simple coding but it basically boiled down to this:
 
On the RTE_textarea.asp page, I change the value at the bottom from strEditorContent to Session("strEditorContent")
 
On the pages where I add a record, I define the variable as:
 
Session("strEditorContent") = ""
 
On the edit pages, I define the variables right after opening up the recordset:
 
Session("strEditorContent") = rs.Fields.Item("field").Value
 
That also makes the code defining strEditorContent in the display_message.asp page irrelevant so I commented it out. Any instance of the variable was replaced with the session variable.
 
No, it's not perfect but it works. It's also important to make sure that non-cached pages show up when the add and edit files are loaded into the browser. Of course, that opens up a whole other can of worms because of the ways "no-cache" in the header works in different browsers. For a tutorial on work around for that, see http://www.htmlgoodies.com/beyond/nocache.html
 
I don't know how folks will react to this (since it's not really integrated into the whole RTE "system") but that's how I got it to work for me.


Edited by cbeaudry - 14 December 2004 at 8:07pm
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2004 at 4:27am
Session varaibles are not reliable so I would avoid them.

The built in querystings:- QS1, QS2, and QS3

Should allow youn to pass database record ID's etc. to the RTE_textbox.asp page as they are passed from the page you place the RTE in by adding there values to the end of the part that opens the IFrame for the text area.

Also to prevent caching (which IE is very bad at with IFrames) when the IFrame is opened the following line of code is used:-

RTE_textarea.asp?noCache=" & CInt(RND * 2000) & "

This then adds a random number to the link, which prevents the caching problem.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.