headhunter
Posts: 130
|
Posted: 07/03/2013, 8:08 PM |
|
Hello,
I have a Ajax RemoteCustomCode that executes some php code.
It is executed in the "onchange" event of a listbox.
I need the value of the listbox to pass it as a parameter in the Ajax call.
When I get the value it must be set in a text field of the same form.
I followed the example in CCS help and the remote custom php code works and I'm able to alert (javascript message window) the returned value
Someone having an example?
Thanks!
Regards,
Bart
|
|
|
jekes
Posts: 36
|
Posted: 07/04/2013, 11:39 AM |
|
Hi
In javascript remote custom code section
select = document.getElementById("your_select_id");
select_value = select.options[select.selectedIndex].value;
parameters['your_param'] = select_value;
In php remote custom code section
$select_value = CCGetFromGet("your_param", "-1");
if($select_value != "-1") {
your code ....
}
Hope this can help you.
|
|
|
|