Skip to content

Instantly share code, notes, and snippets.

@Allisone
Created April 26, 2012 11:26
Show Gist options
  • Save Allisone/2498945 to your computer and use it in GitHub Desktop.
Save Allisone/2498945 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$(document).ready(function(){
$("a").click(function(event){
event.preventDefault();
var request = $.ajax({
url: '<f:format.raw><f:uri.widget ajax="TRUE" action="list" /></f:format.raw>',
type: "GET",
dataType: "html"
});
request.done(function(msg) {
$("#log").html( msg );
});
request.fail(function(jqXHR, textStatus) {
alert( "Request failed: " + textStatus );
});
});
});
</script>
<a href="#">CLICK MICH</a><br/>
<div id="log"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment