Created
June 3, 2010 21:13
-
-
Save donnfelker/424497 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link href="css/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" /> | |
<script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script> | |
<script src="Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script> | |
<script> | |
$(function () { | |
$("#save-button").click(function () { | |
var form = $(this).parents('form:first'); | |
form.attr('action', 'http://example.org/foo/save'); | |
}); | |
$("#reload-button").click(function () { | |
var form = $(this).parents('form:first'); | |
form.attr('action', 'http://example.org/foo/reload'); | |
}); | |
$("#add-row-button").click(function () { | |
var form = $(this).parents('form:first'); | |
form.attr('action', 'http://example.org/foo/addrow'); | |
}); | |
$("#beawesome-button").click(function () { | |
var form = $(this).parents('form:first'); | |
form.attr('action', 'http://example.org/foo/beawesome'); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<form action="/foo/go" method="post"> | |
<div id="bar"> | |
<div id="foo"> | |
<input type="text" /> <input type="text" /> <input type="text" /> <input type="text" /> <br/> | |
<input type="text" /> <input type="text" /> <input type="text" /> <input type="text" /> <br/> | |
</div> | |
<button id="save-button" type="submit">Save</button | |
<button id="reload-button" type="submit">Reload</button> | |
<button id="add-row-button" type="submit">Add Row</button> | |
<button id="beawesome-button" type="submit">Be Awesome</button> | |
</div> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment