ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 5th, 2002, 09:00 AM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
WYSIWYG Editor help!

hello,
I've put together a wysiwyg editor, using some of the code from an artical on this site ( http://www.devarticles.com/content....cleId=90&page=1 ) and some code from another artical,

everything works great in the editor, and only problem I'm having is writing the content from the editor to a db, now my script to write to the db is fine, but I can't get the info to the script,
like I tryed name the Iframe and using a request.form, but I get no info that way,,

can any one please explain to me what I'm doing wrong and how to fix this?

thanks in advance for your time!

Reply With Quote
  #2  
Old July 5th, 2002, 09:19 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,240 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Are you having trouble with saving the data to your database, or from retrieving the info and then displaying it in your source frame?

If you're having trouble retrieving the data, try this thread for some help:

http://www.devarticles.com/forum/sh...s=&threadid=415
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old July 5th, 2002, 09:46 AM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm having trouble getting the data from the iframe, I read something about using java get to the data, but I'm not sure how to do it,

Reply With Quote
  #4  
Old July 5th, 2002, 10:32 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
Hi,

I had the same problem, but got the solution from various message boards...
here is what I did:

In the function Init() section add this:

function savedocument() {

htmtext=iView.document.body.innerHTML;
iView.document.body.innerText=htmtext;
document.saveform.content.value=iView.document.bod y.innerText;

}

where saveform is the name of the form you are using... if you're not using a form...before you output the table to display the buttons of the WYSIWYG part.. add this: (right after the <body onLoad="Init()"> part......

<form action="add_to_DB.asp" name="saveform" method="post" onSubmit="savedocument()">
<input type="hidden" name="content">
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #5  
Old July 5th, 2002, 10:35 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
sorry...I pressed enter and submitted before I finished!!

ok, so after the last bit, comes your buttons and frame etc etc....

at the end of the page... before the </body></html> bit, add this:

<input name="Submit" type="submit" value="Submit">
</form>

then that completes the form. Basically what is happening is that when you submit the form, the contents of the iFrame is being turned in to HTML and placed in to the <hidden> form tag in the page... this is then being submitted in to the database using "add_to_DB.asp"

Hope this helps!

Reply With Quote
  #6  
Old July 5th, 2002, 10:51 AM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hmm, that didn't work for me,,
could I maybe see your code?

my code is too big to put into this forum,
max allowed is 10000 characters.

Reply With Quote
  #7  
Old July 5th, 2002, 11:05 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
sure, no problem.... send me your email address and I'll post it over... I think you can send me a PM and I'll get it that way..?

Reply With Quote
  #8  
Old July 5th, 2002, 11:11 AM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
well I tried pming you my code and still it will not allow that many characters.

my email address is angst@industrialradio.net

thanks for all your help!

Reply With Quote
  #9  
Old July 5th, 2002, 11:19 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
I have sent you the code now..

Hope it's ok!

Reply With Quote
  #10  
Old July 5th, 2002, 12:07 PM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
one more thing,
whats the name of the input,,?
like when using: request.form (" what name should I use ") to get the info to my db,,?

Reply With Quote
  #11  
Old July 5th, 2002, 12:10 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
I used "content" as the hidden variable to store the value of the iFrame in. then to get it in to the DB I used

rsRecordset.AddNew
rsRecordset.BodyofiFrame = request.form("content")
rsRecordset.Update

where "content" is the name of the populated hidden field in the WYSIWYG editor page....

Reply With Quote
  #12  
Old July 5th, 2002, 12:21 PM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok, now I'm getting a strange error while submitting it,

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/edit/submit.asp, line 17

------------------------------------
here's my code:


<%
dim data, content

data = request.form("content")

dim rs
set rs = Server.CreateObject("ADODB.RecordSet")
rs.cursorlocation = adUseServer
rs.CursorType = adOpenKeySet
rs.LockType = adLockOptimistic

rs.open "news",myconn, , ,adCmdTable
rs.addnew
rs("message") = data
rs("date") = date()

RS.update

rs.close
set rs = nothing
%>


any ideas?

Reply With Quote
  #13  
Old July 5th, 2002, 12:25 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
Question

I really don't know! Sorry!
the error appears to be when you are trying to submit the data...

try commenting out all the update and add new commands and try simply outputting the value of "content" to see if the info is actually being sent correctly...

<%

data = request.form("content")

response.write "Here is the info<BR><BR>" & _
"<P>" & data & "</p>"

%>

I think that is the correct syntax....but you get the drift..?!!

Reply With Quote
  #14  
Old July 8th, 2002, 04:20 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
Hi,

Just wondering if you had any luck with getting the DB to work with your WYSISYG editor?

Let me know if there are any other problems...

Kind Regards...

Reply With Quote
  #15  
Old July 8th, 2002, 09:09 AM
angst angst is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 7 angst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hello,
ya I kinda got it working, not just trying to add on more controls for it,
see, I've got a very good one already, but I don't know how to get the java script setup for saving it to a db,

so I'm just using yours till I can get the other one working,
but it's good practice for me

Reply With Quote
  #16  
Old July 8th, 2002, 11:22 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via Yahoo to fakker
cool... hope it goes all ok for you!!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > WYSIWYG Editor help!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap