-
Notifications
You must be signed in to change notification settings - Fork 0
/
vectorForms.js
99 lines (95 loc) · 3.08 KB
/
vectorForms.js
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
$(function() {
$("form.vectorForm").submit(function () {
var valor1 = "";
var valor2 = "";
var valor3 = "";
var valor4 = "";
var valor5 = "";
var valor6 = "";
var valor7 = "";
var valor8 = "";
var valor9 = "";
var valor10 = "";
var valor11 = "";
var valor12 = "";
var valor13 = "";
var valor14 = "";
var valor15 = "";
if ($('.vectorField1').val()) {
valor1 = $(".vectorField1").val().trim();
}
if ($('.vectorField2').val()) {
valor2 = $(".vectorField2").val().trim();
}
if ($('.vectorField3').val()) {
valor3 = $(".vectorField3").val().trim();
}
if ($('.vectorField4').val()) {
valor4 = $(".vectorField4").val().trim();
}
if ($('.vectorField5').val()) {
valor5 = $(".vectorField5").val().trim();
}
if ($('.vectorField6').val()) {
valor6 = $(".vectorField6").val().trim();
}
if ($('.vectorField7').val()) {
valor7 = $(".vectorField7").val().trim();
}
if ($('.vectorField8').val()) {
valor8 = $(".vectorField8").val().trim();
}
if ($('.vectorField9').val()) {
valor9 = $(".vectorField9").val().trim();
}
if ($('.vectorField10').val()) {
valor10 = $(".vectorField10").val().trim();
}
if ($('.vectorField11').val()) {
valor11 = $(".vectorField11").val().trim();
}
if ($('.vectorField12').val()) {
valor12 = $(".vectorField12").val().trim();
}
if ($('.vectorField13').val()) {
valor13 = $(".vectorField13").val().trim();
}
if ($('.vectorField14').val()) {
valor14 = $(".vectorField14").val().trim();
}
if ($('.vectorField15').val()) {
valor15 = $(".vectorField15").val().trim();
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
return true;
}
};
var url = "http://hiades.com.ar/datos/vectorFormsCaptura.php";
url+= "?Field1=" + valor1;
url+= "&Field2=" + valor2;
url+= "&Field3=" + valor3;
url+= "&Field4=" + valor4;
url+= "&Field5=" + valor5;
url+= "&Field6=" + valor6;
url+= "&Field7=" + valor7;
url+= "&Field8=" + valor8;
url+= "&Field9=" + valor9;
url+= "&Field10=" + valor10;
url+= "&Field11=" + valor11;
url+= "&Field12=" + valor12;
url+= "&Field13=" + valor13;
url+= "&Field14=" + valor14;
url+= "&Field15=" + valor15;
xmlhttp.open("GET", url, false);
xmlhttp.send();
});
});