trial and error

View: New views
2 Messages — Rating Filter:   Alert me  

trial and error

by marco-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: trial and error

by Paul Sullivan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not understanding your question or issue.  It looks like you got it to work.

On 10/22/05, marco <marco@...> wrote:

> 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
>


-------------------------------------------------------
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