Announcement

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

#1 2007-03-13 00:06:48

michael_pl
New member
Registered: 2007-03-13
Posts: 3

Getting a value from dynamic created xinha problem

Hi

I have dynamic created xinha.


div.InnerHTML = formRequestFromAJAX;


var config = new Xinha.Config();
                                       
var xinha_editors = Xinha.makeEditors(['tresc'], config);
xinha.startEditors(xinha_editors);
                   
var editor = xinha_editors.tresc;


xinha editor it's draw and functionaly OK, but I don't get is's current value in javascript sad

I try:


editor = xinha_editors.tresc;

var html = editor.outwardHtml(editor.getHtml());

It's don't work... help my please sad


The Best Regards,
Michael

Offline

#2 2007-03-13 10:15:06

michael_pl
New member
Registered: 2007-03-13
Posts: 3

Re: Getting a value from dynamic created xinha problem

It's not possible? sad

Offline

#3 2007-03-13 13:11:40

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

Re: Getting a value from dynamic created xinha problem

Should work from what I see, more details/ a page to look at might provide deeper insight

Offline

#4 2007-03-13 15:55:20

michael_pl
New member
Registered: 2007-03-13
Posts: 3

Re: Getting a value from dynamic created xinha problem

ray wrote:

Should work from what I see, more details/ a page to look at might provide deeper insight

in index.php:

in HEAD

<script language="javascript" type="text/javascript" src="js/scripts.js"></script>

<script type="text/javascript" language="javascript">
  _editor_url  = "js/xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
  _editor_lang = "pl";      // And the language we need to use in the editor.
</script>
<script language="javascript" type="text/javascript" src="js/xinha/XinhaCore.js"></script>
<script language="javascript" type="text/javascript" src="js/xinha/my_config.js"></script>



In scripts.js :

function panelAktualnosciXinhaMake(id) {
   
    var config = new Xinha.Config();
               
   
                                       
    var xinha_editors = Xinha.makeEditors(['tresc_' + id], config);
    Xinha.startEditors(xinha_editors);
                   

   
}

advAJAX.post({
    url: "includes/getForm.php",
    parameters : {
    "dataType" : "news",
    "id" : id
    },
    onSuccess : function(obj) {
    var odp = obj.responseText;
    edNews.innerHTML = odp; //form; in form <textarea id="tresc_id"></textarea>
    panelAktualnosciXinhaMake(id);
    }
});


Textarea draw OK, functionally ok, but how I get value from this textarea dynamic (javascript)?



The Best Regards,
Michael

Offline

Board footer

Powered by FluxBB