View difference between Paste ID: nCx1QSh9 and d5Q2ET4g
SHOW: | | - or go back to the newest paste.
1
<!--- VIEW --->
2
<?php $attributes2 = array('class' => 'form-signin', 'id' => 'form2'); ?>
3
                <?= form_open($attributes2); ?>
4
                <label for="nim_mahasiswa" class="sr-only">Masukkan NIM Anda</label>
5
                <input type="text" name="nim_mahasiswa" value="<?php echo set_value('nim_mahasiswa'); ?>" class="form-control" placeholder="Masukkan NIM Anda" id="nim_mahasiswa" autofocus />
6-
                <?= form_close(); ?>
6+
7
                <?= form_close(); ?>
8
<script>
9
baseUrl='<?=site_url();?>';
10
</script>
11
<!---JS--->
12
$(document).ready(function(){
13
    $(".btn-cek").button(function(){
14
        var nim_mahasiswa = $("#nim_mahasiswa").val();
15
        $.ajax({
16
            type: "POST",
17
            url: baseUrl+"index.php/api/targetnya",
18
            data: {nim_mahasiswa: nim_mahasiswa},
19
 
20
            success:function(data){
21
                if(data == 'S'){
22
                    alert("Tes");
23
                }
24
            }
25
        });
26
        return false;
27
    });
28
});