Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ajaxSend(function(event, request, settings) {
- if ( settings.type == 'post' ) {
- settings.data = (settings.data ? settings.data + "&" : "")
- + "authenticity_token=" + encodeURIComponent( AUTH_TOKEN );
- request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- }
- });
- // When I say html I really mean script for rails
- $.ajaxSettings.accepts.html = $.ajaxSettings.accepts.script;
- $.ajax({
- data:'url_to_remote='+encodeURIComponent(URL), url: '/test/path/update_preview', type: 'post', dataType: 'html'
- });
Add Comment
Please, Sign In to add comment