Reputation: 1893
$.getJSON(
main_url + "tasks/",
{ "task":8, "last":lastMsgID }
I don't really know how this works, but I need a URL or something that can get me messages from a shoutbox and this is what the function uses by default. Does it use a URL and if so how do I plug in the "task" and "last" to the URL? Or is it some other method?
Upvotes: 1
Views: 507
Reputation: 32355
I'm also not sure i fully understand what you want, but a quick explanation of what's going on there. If you check out the api for getJson you'll see that the first parameter is the url to query from and the 2nd is optional data to send to the server. So in your case, the url would be main_url + "tasks/"
the data sent to the server is { "task":8, "last":lastMsgID }
If your main_url
is something like www.domain.com
then your whole request will look like this:
http://www.domain.com/tasks?task=8&last=xxx
where xxx
is the lastMsgID
Upvotes: 3