Announcement

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

#1 2008-03-24 05:43:15

sillyman
New member
Registered: 2008-03-24
Posts: 2

editor with ajax: response a new editor, not show

i have a form:
<form onsubmit='ajax('page.php', 'resdiv');return false'>...</form>
<div id='resdiv'></div>

page.php is a page contain a editor in textarea.
i use:
document.getElementById('resdiv').innerHTML = responseText;
But, not show.
help me.

Offline

#2 2008-03-25 19:08:01

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: editor with ajax: response a new editor, not show

Sorry, you have a bit more verbose. What do you want to do? What does the ajax() function do?

Offline

#3 2008-03-25 21:07:52

sillyman
New member
Registered: 2008-03-24
Posts: 2

Re: editor with ajax: response a new editor, not show

i'll describe more...

i have a form:
<form method='GET' action='page.php' onsubmit="ajax(this.action, 'resdiv'); return false">
    <input type='submit'>
</form>
<div id='resdiv'>result here! </div>

page.php contains a textarea with editor:
<textarea id='editor' name='editor'></textarea>

i want to when i submit form, it must response content of page.php with textarea editor.
Really, it responses  a content of page.php but not editor show in textarea.

Must be a feature of Xinha? With 'load' event, it show..., reverse not show.

Who can help me ?
I like xinha editor very much, beause it has many things i need and graphic has many choices, very good.
But i has that error, so i ...

//222222222222222222222222222222222222222222222222
var div = "";
function ajax(url, resdiv){
  div = resdiv;
  var req = createHttpRequest();
  if (req){
    req.onreadystatechange = onReadyDo;
    req.open("GET", url, true);
    req.send(null);
  }
}

function onReadyDo(){
  if ((req.readyState = 4) && (req.state == 200)){
      var data = req.responseText;
      var d = document.getElementById(div);
      d.innerHTML = data;
  } 
}
//2222222222222222222222222222222222222222222222222

Offline

#4 2008-07-05 18:17:03

channis
New member
Registered: 2008-07-05
Posts: 3

Re: editor with ajax: response a new editor, not show

Hi, I have exactly the same problem.
I started a topic and I'm suscribing to every topic related.
Hope we can keep in touch, I haven't found the answer yet.

My topic is called
Xinha, Ajax, httpRequest object and innerHtml property

Channis

Offline

Board footer

Powered by FluxBB