Till now I've been programming ASP webs. Now a costumer has ordered me to modify a php web that other people have written.
The first thing I've done is to download it to my pc. I'm just studying it and I've got a problem. After a lot of hours trying to find a solution I've decided to ask for it, if somebody can help me.
The problem is that $.getJSON doesn't work and no error is shown.
The code is this:
- Code: Select all
<select name="id0" id="ctl">
<option value="" <?php if($id0_sel == ""){echo ' selected="selected" ';}?>><?PHP echo $tit_selecciona;?></option> <!-- Introducir operación -->
<option value="4" <?php if($id0_sel == "4"){echo ' selected="selected" ';}?>><?PHP echo $tit_buscador0_1;?></option> <!-- Venta -->
<option value="3" <?php if($id0_sel == "3"){echo ' selected="selected" ';}?>><?PHP echo $tit_buscador0_2;?></option> <!-- Alquiler -->
</select>
And when the value of the selectbox changes, the following function is called:
- Code: Select all
$(function(){
$("select#ctl").change(function(){
alert("before"+$(this).val())
var temp_val = $(this).val();
$.getJSON("http://localhost:8887/camp/es/select.php",{id0: $(this).val()}, function(j){
var options = '';
alert ("after");
The first alert works, "before" with the correct value, but the second, after, is never show.
I've changed the web, only select.php, and doesn't work
This web is working fine in a server.
I've installed EasyPHP, PHP 5.4.6, Apache 2.4
I have no idea about the problem. Perhaps configuration, perhaps code. Please help me!!! Thanks

