Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - EASY RTE from and to MDB
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedEASY RTE from and to MDB

 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 Topic: EASY RTE from and to MDB
    Posted: 24 December 2004 at 12:31am
Hi, I need someone, could integrate in the best way, RTE with just only a FIELD in a .mdb file.
It must be very easy for any .asp programmer to modify just a little and give us a working POSTING and EDITING solution of just one field on an access database using RTE.

I hope somebody could do this...
Back to Top
goofy_DK View Drop Down
Newbie
Newbie


Joined: 28 December 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote goofy_DK Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2004 at 2:55am
Hi Paoblo
 
Did U solve your problem ??
 
/Goofy
Back to Top
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: 30 December 2004 at 4:40pm
not yet ! could you help me ??
Back to Top
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: 30 December 2004 at 4:42pm
goofy, I hope you could help me with such a simple example !
Back to Top
goofy_DK View Drop Down
Newbie
Newbie


Joined: 28 December 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote goofy_DK Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2004 at 12:27am

Before RTE

 

I needed to open a specificic record from my acces file.

I have used the strQueryString3 to pass my record-id from my asp file with then form to the RTE_textarea.asp, where I use the id to find my data from my database file.

 

strQueryString3 = Trim(Request.QueryString("showid"))

%>

<form name="frmAddMessage" method="post" action="edit.asp?action=save&showid=<%=strQueryString 3 %>" onSubmit="document.getElementById('Submit').disabled=true;"& gt;

 

<% ' here is my RTE field inserted

'Change this to the path to your RTE files

Const strPathToRTEFiles = "RTE/"                                      'This needs to hold the path to the RTE files

%>

                        <!-- include the rich text editor -->

                        <!--#include file="RTE/RTE_editor_inc.asp" -->

</p>

</form>

 

 

And the code in the RTE_textarea.asp :

 

Dim strQueryString3

 

strQueryString1 = Request.QueryString("QS1")

strQueryString2 = Request.QueryString("QS2")

strQueryString3 = Request.QueryString("QS3")

 

 

if Request.QueryString("qs3")<>"" then (test if I have some data parsed)

 

then open my table and fetch data

 

 

 

 

and insert into :

 

strEditorContent = "<div style=""text-align: left; font-family: arial,helvetica,sans-serif;"">"&DATA_GOES_HERE&a

Back to Top
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: 04 January 2005 at 9:07am
sorry, may be I am a really newbie, but this is just what I have written and doesn´t work:

in RTE_textarea.asp, this is the code:
<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="includes/RTE_setup.asp" -->
<!--#include file="functions/RTE_functions_common.asp" -->
<%


'Set the response buffer to true as we maybe redirecting
Response.Buffer = True

'Make sure this page is not cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"


Dim strQueryString3     'Holds the editors pre-filled content

Dim strQueryString1
Dim strQueryString2
Dim strQueryString3

strQueryString1 = Request.QueryString("QS1")
strQueryString2 = Request.QueryString("QS2")
strQueryString3 = Request.QueryString("QS3")


if Request.QueryString("QS3")<>"" then


'--- Open Database ---'
Set Database = Server.CreateObject("ADODB.connection")
Database.Open "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=" & DataPassword & "; DBQ=" & DataFile

'--- Open set ---'
set Records = Server.CreateObject("ADODB.recordset")
    Records.Open "SELECT * FROM Data ORDER By RecordID DESC",Database, 1, 3

If NOT Records.EOF Then

'--- Setup Variables ---'
   RecordID = Records("RecordID")
   Message = Records("Text")

     strEditorContent = Records("Text")
     
End if

%>
<html>
<head>
<!--#include file="includes/browser_page_encoding_inc.asp" -->


<script language="javascript">
function enableDesignMode() {<%
If RTEenabled = "Gecko" Then Response.Write("     document.desig nMode = 'on'")
%>     }
</script>
<STYLE>
td {border:1px dotted #CCCCCC;}
</STYLE>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="setTimeout('enableDesignMode()', 20);">
<% = strEditorContent %></body>

</html>

/////////////// And in the editEntry.asp I have this other code (edit entry.asp is outside rte folder):

<% AlertBack = True %>
<!-- #INCLUDE FILE="../Includes/Header.asp" -->
<!--#include file="RTE/includes/browser_page_encoding_inc.asp" -->
<!-- #INCLUDE FILE="Admin.asp" -->
<DIV id=content>
<%
'--- Querish Querystring ---'
Dim Requested, DelRecNo
Requested = Request.Querystring("Entry")
Delete = Request.Querystring("Delete")

If (IsNumeric(Requested) = False) OR (Len(Requested) = 0) Then Requested = 0

If Request.Form("Action") <> "Post" Then

'--- Open set ---'
    If (Requested <> 0) AND (Delete <> "True") Then
    Records.Open "SELECT * FROM Data WHERE RecordID=" & Requested,Database, 1, 3
    ElseIf Requested = 0 Then
    Records.Open "SELECT * FROM Data ORDER By RecordID DESC",Database, 1, 3
    Else

    Database.Execute "DELETE FROM Data WHERE RecordID=" & Requested
    Database.Close
    Set Records = Nothing
    Set Database = Nothing
    Response.Redirect(SiteURL & PageName)

    End If

If NOT Records.EOF Then

'--- Setup Variables ---'
   RecordID = Records("RecordID")
   Title = Records("Title")
   Text = Records("Text")
   Category = Records("Category")
   Password = Records("Password")
   strQueryString3 = Trim(Request.QueryString("RecordID"))

End If

Records.Close
%>
<Form Name="frmAddMessage" Method="Post" action="EditEntry2.asp?action=save&showid=<%=strQueryStri ng3%>" onSubmit="document.getElementById('Submit').disabled=true;"& gt;
<input Name="Action" type="hidden" Value="Post">
             <P><span id="Label1">Title : </span><input Name="Title" type="text" value="<%=Replace(Title,"""",""")%>" style="width:80%;" onChange="return setVarChange()"> <a href="?Entry=<%=Requested%>&Delete=True" title="DELETE this entry" onClick="return confirm('Warning! If You Continue Entry #<%=Requested%> Will Be DELETED.')"><img src="<%=SiteURL%>Images/Delete.gif" width="15" height="15" border="0"></a></P>

             <P>Content :<br>
             <table border="0" cellpadding="1" cellspacing="0" width="100%">
                <tr>
                <td class="td01" align="left">

<%
Const strPathToRTEFiles = "RTE/"
%>
<!-- include the rich text editor -->
<!--#include file="RTE/RTE_editor_inc.asp" -->



                </td>
                </tr>

             <tr>
             <td colspan="2">
             </tr>
                </table>
             </P>

             <% If ShowCat <> False Then Response.Write "<P>Category : <input Name=""Category"" type=""text"" value=""" & Category & """ style=""width:10%;"" onChange=""return setVarChange()""></P>"%>

         <% If Legacy <> True Then %>
             <table border="0" cellpadding="0" cellspacing="0" width="30%">
         <tr ><td align="left"><font color="black">
              <acronym title="If you type in a password, your viewers will need to enter it to view the Entry, leaving it blank means everyone can see your entry">Optional<br>Entry Password</acronym></font><br>
           <input name="password" type="password" value="<%=Password%>" maxlength="10" onChange="return setVarChange()"></td>
  &n
Back to Top
goofy_DK View Drop Down
Newbie
Newbie


Joined: 28 December 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote goofy_DK Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2005 at 2:27pm
where do you set your
Request.QueryString("QS3") ???
 
and what is the value
 
Can you get data into your rte form
Back to Top
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: 04 January 2005 at 5:14pm
Sorry, but I don't really know .asp and the way it works.

With RTE for NON richt text browser, I've retrieved the info and I can EDIT with that pages.

BUT, with the RTE for RT browsers, I couldn't get the data inside the IFRAME, and I don't really know how to do it.

I pasted the info BEFORE and AFTER in EditEntry.asp and the other code into RTE_textarea.asp but I couldn't get it to work.

don't you have a simple simple database, with just one FIELD, working to EDIT the info USING RTE ??

Maybe I am missing sthg... I don't know, could you read my basic code posted before if there is just an END IF missing ?

I appreciate all your help.
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.