Skip to content

Commit f009183

Browse files
committed
remove broken jquery.form.js
1 parent ea4c0ab commit f009183

File tree

2 files changed

+22
-1169
lines changed

2 files changed

+22
-1169
lines changed

src/ServiceStack.MovieRest/default.htm

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
<link href="default.css" rel="stylesheet" type="text/css" />
77
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
8-
<script type="text/javascript" src="jquery.form.js"></script>
98

109
<script type="text/javascript">
1110
$(function ()
@@ -129,21 +128,32 @@
129128
$("FORM").fadeIn('fast');
130129
};
131130

132-
$("#btnAdd").click(function ()
133-
{
131+
$("#btnAdd").click(function() {
134132
showDetailsForm();
135133
});
136134

137-
$('FORM').ajaxForm({
138-
success: function ()
139-
{
140-
restLog($('FORM').attr('method'), $('FORM').attr('action'));
141-
$("FORM").hide();
142-
refreshExistingMovies();
143-
}
135+
$("FORM").submit(function (e) {
136+
e.preventDefault();
137+
138+
var data = {};
139+
$("FORM INPUT[type=text]").each(function(){
140+
data[this.name] = this.value;
141+
});
142+
$.ajax({
143+
url: $("FORM").attr("action"),
144+
type: "POST",
145+
data: data,
146+
success: function ()
147+
{
148+
restLog($('FORM').attr('method'), $('FORM').attr('action'));
149+
$("FORM").hide();
150+
refreshExistingMovies();
151+
}
152+
});
144153
});
145-
146-
$("#csvformat B").click(function ()
154+
155+
156+
$("#csvformat B").click(function ()
147157
{
148158
restLog("GET", "movies?format=csv");
149159
location.href = "movies?format=csv";

0 commit comments

Comments
 (0)