|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
WYSIWYG editor & ASP & DB
Hi,
I have implemented the code from setion 1 and 2 of the article to a webpage. I can load text/html into my iframe fine by setting the src to a ASP page that loads the data depending on the ID number given. The problem I have is saving the HTML back to the db. I have the javascript function processNews before the header: function ProcessNews() { // Assign the HTML code to a hidden form variable var htmlCode = iView.document.body.innerHTML; document.frmNews.newsPost.value = htmlCode; if(document.frmNews.newsPost.value == '') { alert('Please enter some content for this news post.'); iView.focus(); return false; } return true; } </script> I have used the same form heading as in the article <form onSubmit="return ProcessNews()" name="frmNews" action="addnews.asp" method="post"><input type="hidden" name="action" value="addNews"> <input type="hidden" name="newsPost" value=""> forwarding to my addnews.asp page that contains <% HTML = request.form("newspost") Set Conn = Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open("C:\secondclick\secondclick.mdb") sqlstr="INSERT INTO TEST (Test2) values ('" & HTML & "');" Conn.execute sqlstr response.redirect "default.asp?PageID=48" %> There are 2 problems I see. The first is the text is getting passed to the addnews page instead of the HTML code and the addnews.asp page doesn't insert it into my table called Test and the columun called Test2 Any help would be great! Thanks in advance! Allan |
|
#2
|
|||
|
|||
|
sorted! i found a update script and it wrks a treat - now on to the image manager!
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > WYSIWYG editor & ASP & DB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|