summaryrefslogtreecommitdiffstats
path: root/media/js/QM_helper.js
blob: 785d193e8ccebc97809e775b98ff452f87bbc836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 $(document).ready(function(){

$('.number:first').append("<a href='javascript:void(0)'  class='next_qm_link'>get next number</a>");

new_qm_link=function(e){
if ($('#id_cave:first')[0].value != "")
{

$.post('/newqmnumber/',{'cave':$('#id_cave')[0].value,'year':$('#id_expedition')[0].value}, function(data){
    $('#id_QMs_found-0-number')[0].value=data;
});
}
else {
alert('Please choose a cave and try again.')
};
};

$('.next_qm_link').bind("click", new_qm_link);

 });