forked from aswinzz/SocialRevolution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.html
104 lines (100 loc) · 2.51 KB
/
layout.html
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
100
101
102
103
104
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Form</title>
<script type="text/javascript">/*
$(document).ready(function(){
$('input[type=button]').click(function(){
ajaxForm($(this));
});
});
function ajaxForm(button){
var form = button.closest('form'),
formElements = ['input:not([type=button]):not([type=submit])', 'select', 'textarea'],
formNames = new Array(),
dataString = '';
for (var i in formElements) {
form.find(formElements[i]).each(function(){
formNames.push([$(this).attr('name'), $(this).val()]);
});
}
for (var i in formNames) {
if (dataString!=='') {
dataString += '&'
}
dataString += formNames[i][0]+'='+escape(formNames[i][1]);
}
$.ajax({
type: form.attr('method'),
url: form.attr('action'),
data: dataString,
success: function(){
console.log(dataString); // Success actions go here.
}
});
}*/
</script>
</head>
<body>
<style type="text/css">
textarea, input:not([type=button]):not([type=submit]) {
width: 100%;
border: 1px solid rgba(0,0,0,.2);
padding: .5em 1em;
font-family: sans-serif;
}
input[type=button], input[type=submit] {
cursor: pointer;
margin: 0;
padding: .5em 2em;
background: #0298b6;
border: none;
color: #fff;
}
.group:after {
content: "";
display: table;
clear: both;
}
.left {
float: left;
}
.right {
float: right;
}
form {
width: 30em;
margin: 0 auto;
}
form div.group > div {
width: 46%;
margin: 0 0 .5em;
}</style>
<form method="POST" action="newissue.php">
<div class="group">
<div class="left">
<input type="text" value="" placeholder="NAME" name="author" tabindex="1" class="redacted" required/>
</div>
<div class="right">
<input type="text" value="" placeholder="SUBJECT" name="title" tabindex="2" class="redacted" required/>
</div>
</div>
<div class="group">
<div class="left">
<input type="text" value="" placeholder="Location" name="location" tabindex="3" class="redacted" />
</div>
<div class="right">
<input type="text" value="" placeholder="PHONE" name="phone" tabindex="4" class="redacted" />
</div>
</div>
<div>
<textarea placeholder="MESSAGE" name="description" tabindex="5" rows="10" class="redacted" required></textarea>
</div>
<div>
<input type="submit" class="button" value="Submit" name="submit"> </div>
</form>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>