-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
61 lines (54 loc) · 1.84 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Form Savior Example</title>
<meta name="description" content="jQuery plugin to prompt save of unsaved changes in form">
<meta name="author" content="Anand Gorantala">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.formSavior.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#personInfo").formSavior({
'msg' : 'User information changes have not been saved.'
});
});
</script>
<style type="text/css">
* { font-family:Arial, Helvetica, sans-serif; }
ol { padding:0; font-size:0.8em; }
li { list-style:none;padding:0.5em 0; }
label{ display:block; float:left; width:100px; }
footer { clear:both;float:right; }
</style>
</head>
<body>
<form name="personInfo" id="personInfo" method="post">
<fieldset>
<legend>User Information</legend>
<ol>
<li>
<label for="name">Name</label>
<input name="name" id="name" type="text" value="Anand" />
</li>
<li>
<label for="address">Address</label>
<textarea name="address" id="address"></textarea>
</li>
<li>
<label for="avatar">Avatar</label>
<input name="avatar" id="avatar" type="file" />
</li>
<li>
<input type="submit" value="Save" /> or <a href="http://ianand2.github.com/Form-Savior/" class="fs_noprompt">This link will allow you to leave without saving</a>
</li>
</ol>
</fieldset>
</form>
<br><br>
<span class="hint"><b>Hint: </b> Enter any input and try to refresh or hit the back button or navigate away from the page by clicking <a href="http://arrowconcept.com">here</a> or using the address bar</span>
<footer>
<a href="http://arrowconcept.com">Arrowconcept.com</a>
</footer>
</body>
</html>