Welcome Guest, Not a member yet? Register   Sign In
problem dependent select with GetJson
#6

[eluser]CroNiX[/eluser]
Is your js located within a php file or a standalone js file? I ask because in your js you have
Code:
url: URL_BASE+'contact/verCity',
and
Code:
$.getJSON("<?php echo base_url()?>contact/verCity",dato, function(json){
If its in a js file it won't parse that php without explicitly setting your server up to parse js files as php files.

Also, your verCity function isn't sending json. Its sending a regular php array. And if you echo a php array, you just get "array".

If you were using firebug you could be examining the responses to the ajax calls and see these errors very easily.


Messages In This Thread
problem dependent select with GetJson - by El Forum - 01-26-2012, 06:22 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 06:33 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 06:46 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 06:58 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 07:23 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 10:37 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 11:17 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 11:26 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 11:57 AM
problem dependent select with GetJson - by El Forum - 01-26-2012, 02:29 PM
problem dependent select with GetJson - by El Forum - 01-26-2012, 02:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB