Announcement

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

#1 2006-08-08 06:43:02

Prufrock
New member
Registered: 2006-08-08
Posts: 2

Reload page removes Xinha content

Hi, I need some help please

I'm using Xinha on a Struts framework. My form also has an Upload attachment field. If I put some text on the Xinha editor and after that I upload a file, the form is sent to the action with the Textarea populated, no problem here (I'm using a form.onsubmit()). The value sent to the server is:

<html>
  <head><link id=IA-style href="xinha/plugins/InsertAnchor/insert-anchor.css" rel=stylesheet><link id=Template-style href="xinha/plugins/Template/template.css" rel=stylesheet><link id=Abbr-style href="xinha/plugins/Abbreviation/abbreviation.css" rel=stylesheet>
  </head><body>
         MY TEXT.....
</body></html>


But when the page is reloaded the text on the Xinha editor has been removed. I must be missing something.

Please help!

thanks

Offline

#2 2006-08-10 01:54:24

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Reload page removes Xinha content

Why would the page reload?  I don't think text in Xinha would survive a (normal) reload, the textarea would be populated with the original text, Xinha would take that.


James Sleeman

Offline

#3 2006-08-10 05:41:06

Prufrock
New member
Registered: 2006-08-08
Posts: 2

Re: Reload page removes Xinha content

The thing is is that I need to reload the page for whatever reason. If I remove the Xinha editor, the Textarea has the original text. But if I use Xinha the field is empty when I reload it

Offline

#4 2006-08-10 10:21:52

stevieray
New member
Registered: 2005-06-01
Posts: 6

Re: Reload page removes Xinha content

How do you set the contents of the textarea field?

I have a similar situation where I sometimes need to return to the editor display after an initial submit fails some validation.

My code differentiates between the initial view and subsequent ones by testing is there was a submitted value from the textarea field.
If the display is the result of a form submission (like after an error was trapped) I use the value of the textarea field read from the submit as the textarea content. Otherwise, for the initial display, I use some default content.

Offline

Board footer

Powered by FluxBB