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');
}

1 Answer 1

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/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.