« Return to Thread: trial and error

trial and error

by marco-19 :: Rate this Message:

Reply to Author | View in Thread

getting it to work took some dedication.

I used the official documentation, getting the response
attributes slowed me down.

For single values:
use $cp->set_data($string1); in the back-end to sent
the string.
in the frontend assign your result with
document.getElementById('id for entry field for
string1').value = result.ajaxResponse[0].data;
(the front-end is default to return type object)

For multiple values:
backend;
$string1_node =& $cp->add_node("node name for string1");
$string2_node =& $cp->add_node("node name for string2");
$string1_node->set_data($string1);
$string2_node->set_data($string2);
frontend;
> return type set to XML (i did not get the
get_attribute call to work).
document.getElementById('id for string1').value =
result.getElementsByTagName('node name for
string1').item(0).firstChild.data;
document.getElementById('id for string2').value
= result.getElementsByTagName('node name for
string2').item(0).firstChild.data;



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Cpaint-developers mailing list
Cpaint-developers@...
https://lists.sourceforge.net/lists/listinfo/cpaint-developers

 « Return to Thread: trial and error

LightInTheBox - Buy quality products at wholesale price!