This here: $(function Requests() { // ... });
What are you trying to do? That's not valid Javascript syntax. On Aug 18, 4:47 pm, efet <efetun...@gmail.com> wrote: > Hi, > > I dont understand why the following code is not working. I dont > receive any errors, its just not working. > > $(document).ready(function() { > $(function Requests() { > $.ajax({ > type: 'GET', > url: 'content/requests/index.cs.asp?Process=ViewRequests', > success: function(data) { > var that = this; > $("#requests").html(data); > $("[name='respond']").click(function() { > alert(that) > $.ajax({ > type: "POST", > data: $(that).closest("form").serialize(), > url: > "content/requests/index.cs.asp?Process=RespondRequests", > success: function(output) { > $(that).closest("form").html(output) > }, > error: function(output) { > $(that).closest("form").html(output); > } > }); > }); > }, > error: function (XMLHttpRequest, textStatus, errorThrown) { > $("#requests").html('.'); > } > }); > }); > > });