jquery-ajax

How to parse XML string value using jQuery?

Hi All, I am new to jquery. I am trying to parse xml string using jquery. I have found one sample: $(function () { $.get('data.xml', function (d) { var data = ""; var startTag = "<table border='1' id='mainTable'><tbody><tr><td style=\"width: 120px\">Name</td><td style=\"width: 120px\">Link</td></tr>"; var en...

Jquery scroll to a div tag

I use the following in order scrolling to top. How could i edit it so the top is set by a div tag? var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance(); pageRequestManager.add_endRequest(function() { $('html, body').animate({ scrollTop: 0 }, 'slow'); }); ...

post form data to controller without page refresh

can any one guide me. Post form data to controller without page refresh in asp.net mvc application using Jquery ajax. ...

jquery advice on tabbed system

Hello There, I create a 'my account' section for a site, the site has some e-commerce functionality too it, what I wanting to create is a tab that shows the users current basket/short list and the other tab to show there purchase history. On buying the products from the short list (this is done in a one click system using AJAX, if a su...

jquery ajax and php arrays

Hi There, I am trying to submit some data to a PHP script, however the PHP scripts expects the data to arrive in a specific format, like this example which is a dump of the post, Array ( [save] => Add to shortlist [cv_file] => Array ( [849709537] => Y [849709616] => Y [849709633] => Y ) ) The process is currently that a user selects t...

Display progress bar while an image gallery is loading on django template.

I want to display a progress bar (or loading icon) while a image gallery is loading on django template. Image gallery is having a div in the template and for that div only the progress bar should appear. Please refer to http://www.openstudio.fr/jquery/ as I am using this gallery ...

jQuery Dynamic $.post ajax call

Hi, I am trying to run an ajax $.post call on a script that builds a form dynamically. How would i go about doing this. Currently the psudocode looks like this: //I Would build the ajaxString with a foreach loop, looping through all of the inputs on //the page. The following is psudocode, var ajaxString; for each inputs { ajaxstring +=...

Optimizing jQuery for Tabs

I am in the process of developing a widget. The widget has three tabs that are implemented in the following way. <div id="widget"> <ul id="tabs"> <li><a href="http...">One</a></li> <li><a href="http...">Two</a></li> <li><a href="http...">Three</a></li> </ul> <div id="tab_container"> <div i...

How to parse Json object in ASP classic passed from jQuery

Using a jQuery dialog, on clicking OK I call $.post( "save.asp", { id: 1, value: "abcxyz" } ); to pass the values to my ASP classic file that will update the database. I don't need a return value (unless it fails). I'm a relative noob to jQuery, so I'm assuming I'm using JSON to pass the values to the ASP file. I just don't know what to...

jquery noob problem with variables (scope?)

I'm trying to retrieve data from a php file named return that just contains <?php echo 'here is a string'; ?> I'm doing this through an html file containing <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt; <script> var x; $.get("return.php", function(data){ x = ...

Update MySQl table onDrop?

Hi all. I am writing a PHP/MySQL application (using CodeIgniter) that uses some jQuery functionality for dragging table rows. I have a table in which the user can drag rows to the desired order (kind of a queue for which I need to preserve the rank of each row). I've been trying to figure out how to (and whether I should) update the data...

Creating an AJAX-Enabled Web Site

Hey, I'am trying to follow an ASP.NET with AJAX Training. At certain moment, they deploy an AJAX-Enabled Web Site. but for me I can't found this option (I'm using Visual Studio 2008). Even if I installed the Ajax Control Toolkit it still not working for me !! What must I do to find this ? ...

jQuery timer, ajax, and "nice time"

So for this is what I've got: $(document).ready(function () { $("#div p").load("/update/temp.php"); function addOne() { var number = parseInt($("#div p").html()); return number + 1; } setInterval(function () { $("#div p").text(addOne()); }, 1000); setInterval(function () { $("#geupdate p").load("/update/temp.php");} ,10000); }); So th...

Dynamic Colorbox galleries using Ajax

Hi, I am new to jQuery / AJAX. I have a page that uses colorbox to display photo galleries. The page displays only one image from each gallery. When clicked, a colorbox opens up with all of the photos from that gallery. These inner photo references (for all photos from all galleries) are hidden on the page in an invisible div. The page ...

Using jQuery ajax response data

Hi again, I am using ajax post and am receiving data in the form of html. I need to split up the data and place pieces of the data all over the page. I built my response data to be something like <p id='greeting'> Hello there and Welcome </p> <p id='something'>First timer visiting our site eh'</p> It is a little more complicated and dyna...

What's the best way to return stuff from a PHP function, and simultaneously trigger a jQuery action?

So the title is a tad ambiguous, but I'll try and give an example. Basically, I have an 'awards' system (similar to that of StackOverflow's badges) in my PHP/CodeIgniter site, and I want, as soon as an award is earned, a notification to appear to the user. Now I'm happy to have this appear on the next page load, but, ideally I'd like it...

How to handle empty return from getJSON

Alright so I have a php script which gets results from a DB, and to get those results I'm using a jQuery script to pull the results via getJSON. It works perfectly but now I want to do something if the php script returns no results (empty). I tried: $.getJSON('path/to/script'), {parameter:parameter}, function(data){ if (data) { aler...

jquery attr problem

function rotateimg(ulid,showid,linkid) { var cur = $("#"+ulid+" li.current"); var nxt = cur.next("li"); if (nxt.length == 0) { nxt = $("#"+ulid+" li:first"); } cur.removeClass("current"); nxt.addClass("current"); var img_value=nxt.attr("id")...

Firefox crashes with mulitple Uploadify JQuery browse buttons and ajax

Hi, I'm using four JQuery Uploadify browse buttons on a page that's calling the Uploadify code/buttons through Ajax. We have a javascript function called from onComplete which refreshes the Ajax page. The problem we're encountering is that when you start uploading one file, if you click browse to upload another file, Firefox will crash ...

How to do REST with PUT and DELETE

It says about the type option of the jQuery.ajax() method that The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. So... Does that mean that PUT and DELETE won't work if the browser does not su...