aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery to post data without leaving page & textarea CKEditor? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery to post data without leaving page & textarea CKEditor?" Watch "jQuery to post data without leaving page & textarea CKEditor?" New topic
Author

jQuery to post data without leaving page & textarea CKEditor?

Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
Did you create the editor with jQuery as the directions say to do?


Eric
Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
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
 
 
subject: jQuery to post data without leaving page & textarea CKEditor?