1

I found something on stackoverflow that works for prototype but I'm using jquery. Any ideas what I need to call instead?

Check if Javascript is Enabled (Serverside) with Rails

function confirmJavascript()
{
    // Assuming you are using Prototype
    new Ajax.Request('/JavascriptController/confirm');
}
Community
  • 1
  • 1
mediarts
  • 1,511
  • 4
  • 18
  • 29

1 Answers1

2

If you just want to make an Ajax request to '/JavascriptController/confirm', then you would do this:

$.ajax({
  url: '/JavascriptController/confirm'
  }
});

However, its never going to get sent if Javascript isn't enabled.

More info about making Ajax requests using jQuery is available here: http://api.jquery.com/jQuery.ajax/

Mark Costello
  • 4,334
  • 4
  • 23
  • 26