I have a page that contains a form. The way I want it to work is I want to have the user select one of three radio buttons, and once that happens a set of checkboxes will display for them to select.
I want to do this all in Ajax so the page won’t have to refresh after every click but I’m having a problem on the radio button section. In my PHP script I’m attempting to return something like this:
echo “show_checkboxes”;
and back in the JavaScript function I compare the xmlHttp.responseText to “show_checkboxes” to see if they match. However they do not match correctly and the responseText actually looks like “show_checkboxes “. I tried to trim the response back in PHP but had no luck.
Hopefully that made sense.