Quote:
Originally Posted by Rowsdower!
I think in the rush to get this fixed you may not be paying full attention to what I am saying. Whether php-generated or not, your HTML source code needs to include single quotes around the value 'zfield_' in order to resolve the javascript error in the page. Once the javascript error is resolved we can work on getting the functionality to do what you actually want it to do.
So if, for example, your php script generates the line like so:
PHP Code:
print "<select class=\"primary\" name=\"Test Field\" id=\"zfield_1\" tabindex=\"1\" onchange=\"ajaxReq(1, this.value, ".$peid.");\">\n";
you would need to amend it to be like this instead:
PHP Code:
print "<select class=\"primary\" name=\"Test Field\" id=\"zfield_1\" tabindex=\"1\" onchange=\"ajaxReq(1, this.value, '".$peid."');\">\n";
Or, if you generate the line like this:
PHP Code:
<select class="primary" name="Test Field" id="zfield_1" tabindex="1" onchange="ajaxReq(1, this.value, <?php print $peid; ?>);">
then you would need to make it like this instead:
PHP Code:
<select class="primary" name="Test Field" id="zfield_1" tabindex="1" onchange="ajaxReq(1, this.value, '<?php print $peid; ?>');">
In any case, no matter how you generate the <select> tag and its attributes you *need* to get single quotes around that parameter in the HTML output.
|
Thank you, I misunderstood

the ajax call is now being made!!! However, it's not returning what it should

. Upon selection, the options change to those of the dropdown at the bottom where you can change the site's style :-/. The ajax.php file contains more ajax functions but all are wrapped in condition tags based on $_REQUEST or $_POST, perhaps I need a more specific condition for my ajax call?