I need some help loading a database value into the textarea of the new CK.Editor
In the old FCKEditor I used the following code to display the contents of the field that I passed to the page as a parameter called query
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "fckeditor/"
oFCKeditor.Value = Websites.Fields.Item(query).Value
oFCKeditor.Create "FCKeditor1"
%>
What I can't figure out is how to display the data in the new version. The documentation says to, "Note that, if you want to load data into the editor, from a database for example, just put that data inside the textarea, just like this <textarea name="editor1"><p>Initial value.</p></textarea>
So I tried that using this code:
<textarea name="textarea1" cols="80" rows="25"><%=(Websites.Fields.Item("query").Value)%></textarea>
but it returns an error saying, "Item cannot be found in the collection corresponding to the requested name or ordinal, line 44". Fair enough - this means the recordset does not contain a field called "query" ...which is correct. But the code should replace the value "query" with the parameter I pass to the page.
What I am missing?
In the old FCKEditor I used the following code to display the contents of the field that I passed to the page as a parameter called query
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "fckeditor/"
oFCKeditor.Value = Websites.Fields.Item(query).Value
oFCKeditor.Create "FCKeditor1"
%>
What I can't figure out is how to display the data in the new version. The documentation says to, "Note that, if you want to load data into the editor, from a database for example, just put that data inside the textarea, just like this <textarea name="editor1"><p>Initial value.</p></textarea>
So I tried that using this code:
<textarea name="textarea1" cols="80" rows="25"><%=(Websites.Fields.Item("query").Value)%></textarea>
but it returns an error saying, "Item cannot be found in the collection corresponding to the requested name or ordinal, line 44". Fair enough - this means the recordset does not contain a field called "query" ...which is correct. But the code should replace the value "query" with the parameter I pass to the page.
What I am missing?
Re: loading database content into textarea
From this <%=(Websites.Fields.Item("query").Value)%>
To this <%=(Websites.Fields.Item(query).Value)%>