ewebeditor4.80 version of the installation tutorial in ASP environment

Source: Internet
Author: User
Tutorial |ewebeditor First Step, need to download EWebEditor4.80 code, please click here to download, I This is 4.80 version of.

Second Step, unpack the package, inside is a folder called Ewebeditor, and copy it all to your site's background directory, like me:.

Third Step, we define a few pages and a database of fields, the name may not be the same as mine, but you can certainly find in your background to find the same features of the file:
1, news_add.asp, News add page, display is the input title, content, author, date and so on place. Inside there will be a form tag pointing to news_add_action.asp.
2, news_add_action.asp, news Add after processing page, the function is to insert the contents of the news_add.asp into your Access database.
3, ewebeditor.htm, this is not hypothetical, this is your decompression will be seen in the Ewebeditor folder.
4, the database name is Date.mdb, inside has a table, is called the News,news list has a field, is called the content, it is the concrete content which puts the news, is we want to take advantage of Ewebeditor inserts the content. As for the other fields, it's not verbose.

Fourth Step, the settings in the news_add.asp.
You could have been a simple input box textarea, similar to the bottom:

Reference:

<textarea name= "textarea" ></textarea>
Then, replace this code with the following code:

Reference:

<input type= "hidden" name= " content" value= "" >
<iframe id= "EWebEditor1" src= "ewebeditor/ewebeditor.htm?id= content&style= coolblue" Frameborder= "0" scrolling= " no" width= " height=" ></iframe>
To pay special attention to the red part of the code, it must be modified to the corresponding code, the code in the Blue section, is set the appearance parameters, you can modify the details of the function does not say, are almost.

Fifth Step, the code in the news_add_action.asp

Reference:

<!--#include file= ". /conn/conn.asp "-->
<%
Set Rs=server. CreateObject ("Adodb.recordset")
Sqlstar= "SELECT * from news where news_title= '" &request.form ("News_title") & ""
Rs.Open sqlstar,conn,1,3
If rs.eof or Rs.bof then
Rs.addnew
RS ("News_title") =request.form ("News_title")
RS ("News_date") =request.form ("News_date")
RS ("News_user") =session ("user_name")
RS ("content") =request ("content")
Rs.update
Response. Write "<script>alert" (' Add success! '); this.location.href= ' news_add.asp ';</script> '
Else
Response. Write "<script>alert (' This news has been added!) '); This.history.go ( -1);</script> "
End If
Rs.close
Set rs=nothing
Conn.close
Set conn=nothing
%>
The red part of the code is a place that deserves special attention.

Here is done, we try it, if you find any problems, and then come here to leave a message, we study together.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.