Welcome Guest, Not a member yet? Register   Sign In
Dynamic Select Box
#2

The controller functions that you're trying to call, expect a parameter $slug. So the url to call the function should look like this:
PHP Code:
site_url() . 'karte/get_province/' $slug

In your code, the function never gets that parameter when you do an AJAX request.
To solve this, pass the slug as one of the post data fields.

Code:
data: {'tb_edition_id' : tb_edition_id, 'slug' : slug },
Of course, you'll have to let your javascript fetch the value of slug.

Then, in the controller, simply read the value with $this->input->post('slug');
Reply


Messages In This Thread
Dynamic Select Box - by Germanikus - 09-28-2017, 05:42 AM
RE: Dynamic Select Box - by Wouter60 - 09-28-2017, 12:42 PM
RE: Dynamic Select Box - by Germanikus - 09-28-2017, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB