• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i want to make a chained dropdown

#2
Check this line of code:
PHP Code:
<?php if ($title 'Tambah Biaya Kirim'): ?>

You are making a common mistake here. The if statement will always evaluate as TRUE, unless you change it into:
PHP Code:
<?php if ($title == 'Tambah Biaya Kirim'): ?>

Another thing: at the end of the javascript in the view you have:
Code:
$("#id_kabupaten").change(function() {
  get_kecamatan($(this).val(), '');
});

The get_kecamatan() function is expecting the selected item als second parameter, right? In your case, it's always an empty string. I can't judge if that's causing the problem, but it's worth looking at.
Reply


Messages In This Thread
i want to make a chained dropdown - by pasekb - 01-11-2019, 07:35 AM
RE: i want to make a chained dropdown - by Wouter60 - 01-11-2019, 12:37 PM
RE: i want to make a chained dropdown - by pasekb - 01-11-2019, 10:23 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.