by
6
5
3,168
0
Top 1% !
Popular
Famous
Nice
Specified
Popularity: 4339th place
This snippet is Public
No tags for this snippet yet.
LicenseMIT_X11
SourceGithub
TechnologyAJAX

ajax request

ajax request: 
gistfile1.txt
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/49426/ajax-request?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
function ChangeStackupStatusPlayers(stackup_number) { $.ajax({ type: "PUT", url: "/stackups/" + stackup_number, data: { stackup_status: false }, dataType: 'script' }) // $('#stackup_button' + stackup_number).hide(); //$('#stackup_button') // stackup_id = parent().attr('id') //$("#player_button_span").html("Pending"); //var = this.id; console.log(stackup_number); // console.log(event.data.stackup_status); } html file <div id="<%= stackup.id %>"> <button class="btn btn-xs" style="margin-top:0px;" id="stackup_button<%= stackup.id %>" onclick="ChangeStackupStatusPlayers(<%= stackup.id %>);"><i class="glyphicon glyphicon-tasks"></i><span id="button_span"> <%= stackup.status_message %></span></button> </div>
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus