Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-01-24 00:38:23

beanstalk
Xinha Community Member
Registered: 2007-02-06
Posts: 13

jquery form plugin and ajax

i'm using xinha and some jquery.  when i use the jquery form plugin, which binds a form submit to jquery's ajax submit, the editor contents are not submitted.  if i switch to edit in html mode, then the contents are submitted.  i can submit the data not using ajax.  but that's not what i need to do.  any ideas?  thanks.

Offline

#2 2008-01-24 11:56:15

beanstalk
Xinha Community Member
Registered: 2007-02-06
Posts: 13

Re: jquery form plugin and ajax

maybe this will help.  here's the link:

https://www.inflatableoffice.com/_iodev … tepage.php

user: xinha
pass: xinha

then to login to the page:

user: demo
pass: demo

doesn't look so hot yet in IE.  i suggest looking at it with firefox, although, i'm guessing that's what you are all using anyway.  click the edit link to get the editor up.  click the save or submit button to submit using jquery forms plugin.  you have to do a refresh currently to see the results.  i don't have that part coded yet. 

notice the alert boxes.  the first is showing the contents of the textarea.  in the second, i am setting the value of the textarea with editor.outwardHtml(editor.getHTML()).  i am doing this with the beforeSubmit function of the jquery form plugin. 

http://www.malsup.com/jquery/form/#api

if i switch xinha to edit in html mode, the alerts are the same and it saves the changes.  in both cases, i am getting strange characters.  i am using firefox 2.0.0.11 and xinha 0.94.

Offline

#3 2008-01-24 13:24:06

beanstalk
Xinha Community Member
Registered: 2007-02-06
Posts: 13

Re: jquery form plugin and ajax

okay, i got it to work somewhat.  i used the editor.outwardHtml(editor.getHTML()) command in the function that fires when the user clicks my save button - before form.submit() is called.  however, i am still getting some strange characters.  mostly this: Â.  any ideas?

Offline

Board footer

Powered by FluxBB