-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs file
52 lines (43 loc) · 1.17 KB
/
js file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$(document).ready(function(){
$('#vella1').click(function(){
var value=$.trim($("#vella").val());
if(value.length>0)
{
var nameInput = document.getElementById('vella');
document.querySelector('form').addEventListener('submit', function (e) {
//prevent the normal submission of the form
e.preventDefault();
console.log(nameInput.value);
});
}
else{
alert("no reviews entered");
}
});
$('.btn').click(function(){
bootbox.prompt("enter field 1 for the table",function(res){
if(res== null){
alert("empty field!!!");
}else{
$('.table1').append('<tr><th>'+res+'</th></tr>');
}
});
//$('.table1').append('<tr><th>'+'serial no.'+'</th>'+'<th>'+'Algorithms'+'</th></tr>');
});
$(".remove" ).click(function(){
$('.table1').remove();
});
});
/*var value=$.trim($("#vella1").val());
if(value.length<0)
{
prompt("No reviews entered!!! can't submit");
}
else{
var nameInput = document.getElementById('vella');
document.querySelector('form').addEventListener('submit', function (e) {
//prevent the normal submission of the form
e.preventDefault();
console.log(nameInput.value);
});
}*/