Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery to post data without leaving page & textarea CKEditor?

 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have been looking at code for hours and cannot seem to solve this one myself, or fully understand what I should be doing based on all of the FAQ and tutorials.

I am using jQuery to POST without leaving the page based on this tutorial, http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/

Although when I try and pull the data from the text area (which CKEditor is wrapped around via the class), no content is passed through.

I am guessing this is due to the content actually being stored within the CKEditors instance, and not on the actual page.

So I tried to all the following code to my jQuery code, to no avail.



For reference, here is the section (which needs adapting - but im unsure how) that will pull the content from an 'input' field, but not a 'textarea' (with CKEditor class)




I am in the very early stages of trying to understand JavaScript / jQuery / CKEditor so any pointers on this issue would be greatly appreciated.

Thanks
Michael
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you create the editor with jQuery as the directions say to do?


Eric
 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,

No I don't believe I have, I am struggling to understand a lot of what is on that page due to my lack of JS knowledge (it will come in time :-) )

That said, I have come across the following code which I have placed in the JavaScript file I have done (just before I am requesting the 'text' from the 'textarea') and this has solved the issue.



I am going to have to buy a beginners guide to JS so I can understand the theory behind it, instead of my current trial and error approach.

Thanks for help.

Michael
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic