tags:<?php echo Model_Post::getTypeaheadList('diving_shop'); ?> , tokenSeparators: [","]}); $("#form_location").select2({ tags:<?php echo Model_Post::getTypeaheadList('location'); ?> , tokenSeparators: [","]}); $("#form_point").select2({ tags:<?php echo Model_Post::getTypeaheadList('point'); ?> , tokenSeparators: [","]}); }); $(function() { $("#use_before_one").click(function(){ x = $("#form_serial_dive_no").val(); n = 1 + Number(x); location.href = "<?php echo Uri::create('log/create/'); ?> " + n; return false; });