Pinchy
Pinchy

Reputation: 1536

jQuery with ajax:true parameter

$.getJSON('${userDetailsURL}', {
    Id :  "${user.id}",
    ajax : 'true'
},..... etc...

What is ajax:'true' for? I couldn't figure it out.

Thanks a lot

Upvotes: 1

Views: 1034

Answers (2)

Jamie Dixon
Jamie Dixon

Reputation: 54021

The parameter containing the ajax:true part is the data being sent to the server.

My guess would be that the user is checking for the existence of ajax: true when the call is made so they can do something differently (or to verify) when the url is hit by an ajax call rather than directly (or through some other means).

Upvotes: 1

SLaks
SLaks

Reputation: 888203

It's a parameter that gets sent to the remote server in the query string.

Upvotes: 0

Related Questions