jquery-ajax

How to detect changes to a table using JQuery

I have a table which always updates by clicking on another link. This link has ajax functionality which is created by serverside API at run time and JQuery has no control over this link. Now whenever this link changes table, I want to call a function by JQuery, how do I do that? ...

Best practice for sending large number of variables using jQuery ajax

I have a large form (30 different input fields) and want to use jQuery's ajax functionality to POST it to a PHP script. For smaller forms I usually send each variable as it's own POST variable. e.g. $.ajax({ type: 'POST', url: 'someScript.php', data: {var1: var1, var2: var2, etc: etc} }); Is there any disadvantage of using this...

Strange problem Ajax enabled MVCContrib Grid pager

Hello, Let's explain the context: I have a person form inside a jquery dialog that has some tabs to group informations related to this person (Personal data, addresses, emails, position, etc.) One of the tab show the Person addresses through an ajax call to this controller action [HttpGet] public ActionResult GetAddresses( int id, int...

ASP.NET WebService mistakenly returning XML instead of JSON only when using Http Get but web.config is set up right

Symptom: When I make a web service request (from JQuery using .ajax, to ASP.NET .asmx file), if it is made using GET instead of POST, the .asmx file always returns XML instead of JSON. If I flip the call back to posts, it responds just fine as JSON. Goal: How can I get JSON instead of XML, using HTTP GET? I've a fair bit of googling...

Update pannel not working with jquery tabs

HI. I am using JQuery tabs in my aspx page, but update panel is not working. If I do any operation in tab2, after posting back, tab1 is activated. How can i solve this? Thanks in advance. ...

Update the content of a div via AJAX with jQuery when they're new events

I am doing a match "live timing" where an administrator sends to a database new inputs like: "Team A scores! 1-0". This is shown in a public website inside a <div /> and I want to get the new inputs and print it. I've never done something similar and I don't know what is the way to go. I also have some doubts: It's posible that the se...

Differentiate ajax call for different list items in listview.

I am using a listview to display some items and its owner name. All owners name are links and they are having same class and same id(since in listview). But I am displaying some information through an ajax call on mouse hovering the link. The ajax call retrieves data from database. But problem is that since I am using their css class as ...

jquery - Empty responseText in XMLHttpRequest object when server returns 500

I have to make SOAP calls from javascript between different domains. On the server side there is a list of allowed domains, methods and headers which are included in the response by a filter. It works well (even between different domains) when the response code is 200 but when an exception is thrown on the server side the xhr object has ...

Is it better to generate html for an ajax function in the JS handler or in the PHP ajax function?

I'm designing some UI's for a product and we want to utilize jQuery and PHP. The content to generate is a list of checkboxes (10-100) that a user will be modifying (removing multiple at a time and changing the entries). I thought I'd try something new and ask StackOverflow (read: you) what is preferred: generate the html in the php call ...

ajax call error for list view data item.

function manageVoting() { var parameter; var myVoting; var divVoting; var divVotes; var value = -1; var parameterData; $('div.votemaincontainer').each(function() { parameter = $(this).find('#[id$=hfUrl]').val(); myVoting = parseInt($(this).find('#[id$=hfMyVote]').val()); divVoting = $(t...

Google Crwaling AJAX Application

Hi , In my site , I added lot of AJAX function , For (dynamic pages ) , I read the below thread, i understand GOOGLE AJAX Crawler Procedure, Just am confirming , In applications am not used the links, i am using DIV, in that DIV onclick i called the ajax function , in that ajax code there is a URL , in this URL i appended...

jQuery and js file not loading?

I need to dynamically update the contents for every few seconds, without reloading the page, so i thought to use jquery load() function, this loads the contents fine but not the js or jquery file from head tag. Here is sample code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml...

Submit array param with jQuery ajax/load

public ActionResult DoSomething(string[] arr, bool someBool, int someInt) { } trying to call the above method from jQuery: var test = []; test.push('dog'); test.push('cat'); $container.load('MyController/DoSomething', { 'arr[]': test, 'someBool': true, 'someInt': 1 }, function(response, status, xhr) { ...

Only perform jQuery ajax query once

How can I get jQuery to only do an ajax query one time? Right now it contacts the server every time a user toggles "Comments (X)" // Replies - Toggle display of comments $('.info .reply').click( function() { $('.reply', this.parentNode.parentNode).toggle(); return false; }); // Load comments $('.info .reply', this).mousedown( ...

What's a good way to display a loading image until an ajax query completes?

Right now it contacts the server every time a user toggles "Comments (X)" I'd like to make it so as soon as a user clicks ".info .reply" (Comments (X)), an ajax loader appears just until the data is finished loading, then the loader disappears. // Replies - Toggle display of comments $('.info .reply').click( function() { $('.reply'...

jquery simple image slider w/ajax

I have a page with lots of images on it, and only want to load extra images on demand. IE if the user clicks on it or mouses over, whatever. Most if not all of the sliders i've seen use the hidden attribute with all the elements getting loaded at once, which would cause undue burden in my case. I liked: http://nivo.dev7studios.com/ ...

Calling JSON-enabled WCF service with jQuery returns null

I have the following script in my web page to call out to a JSON-enabled WCF service that I have created and am hosting on my web server. However, the alert displays "null". When I point to the url in a browser it returns very simple JSON: {"city":"Ann Arbor"}. Also, when I run the page containing the code below with Fiddler running,...

Call jquery $.ajax inside Javascript function...

I want to call an ajax function to do some stuff... function RemoveTest(subfolder) { var datastring="name="+subfolder; alert(datastring); $.ajax({ type: "POST", url: "mystuff.php", data: datastring, success: function(msg){ alert( "Data Saved: " + msg ); // some suff there ...

I have built autocomplete input box (but there is a problem with foucsout)

I have built autocomplete input box (but there is a problem with foucsout) Watch this : http://www.youtube.com/watch?v=IxlXWfJsSeM Demo: http://www.faressoft.org/autocomplete/ My HTML Code : <div class="autoCompleteDiv"> <input type="text" value="" size="60" name="countryName" id="countryName" class="autocomplete"> <ul class=...

Rails and Ajax form submission

I am writing an application that will allow a user to add a component to a particular page in my DB, but am stuck on a little bit of the JS. I have the form submitting just fine. I am stuck on how to "refresh" the container div that shows all of the current components tied to a page. I am from a PHP background, so I know that I could w...