• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jQuery to post data without leaving page & textarea CKEditor?

 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you create the editor with jQuery as the directions say to do?


Eric
 
Michael Cropper
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic