ajax

Why use CakePhp AJAX helper instead of jQuery?

Hello, I'm just starting using cakePHP and I saw on that there was an AJAX Helper in it. My question is simple : should I rather use this helper or should I keep doing AJAX with jQuery? Are there any changes I should perform in existing jQuery AJAX calls? Thanks ...

Getting started with Qooxdoo

i downloaded Qooxdoo, then ActivePython and installed it as in this tutorial http://qooxdoo.org/documentation/1.1/helloworld. When I follow the instructions I get the following results: C:\qooxdoo-1.1-sdk\tool\bin\create-application.py --name=custom --out=C: - this command opens a "create-application" wordfile. cd C:\custom inside c:\c...

resize DIV matching the new content with jquery

Hello, I have a DIV which shows one image at once coming from an ajax script, the images are all different in height and are showed with fadeIn/fadeOut (just for the tag) How can I allow to resize the DIV (that contains the img tag of course) "sliding" based on the new content before the images that fadein changes the DIV height very r...

Display modal after postback without ASP.NET Ajax

I have an ASP.NET button. When the button is clicked, I'd like a modal popup to display after the server-side code for the button runs. I don't want to use the ASP.NET Ajax control toolkit modal popup extender. With ASP.NET Ajax, I can hook into the end request event. Is there a way to do this without ASP.NET Ajax. just jQuery? I ba...

jQuery show div on click, hide the others

I'd like to have a text area on my page that shows a div and hides the others (let's say 8 other divs). On click, I'd like the chosen div to show and the current div & other divs to hide. Is there a simple solution to this? Possible to build off of: http://stackoverflow.com/questions/2509807/show-current-clicked-div-hide-previous-clicked...

Jquery/Ajax and PHP rendering TR

I am scraping sites, and I am doing this one at a time, and then trying to get the results to display AS I get them. I am trying to render one TR at a time, but instead, it does every single one, and then renders ALL the TRs. Here is the call to javascript: <body onload="getOffers(companies , {$scraped}, {$isbn13});"> Here is the JS/...

My Ajax is trying to render a view that it shouldn't..

So everything works. But if a user has firebug's console open, they'll see a bug. :D When my AJAX is sent : $(".remove_qf").live("click", function(){ $.ajax({type: "POST", url: $(this).attr("href"), data: { '_method': 'delete' }, dataType: "script"}); return false; }) And my controller fires it : def destroy @quick_fact = @org...

create a widget to retrieve and display data via ajax

I tried the classic ajax approach, but that throws an access denied javascript exception when trying to add a script stored on another domain. Now, I'm sure this is possible since google populates google ads via js only; so does twitter, and the list can continue. How I thought of it so far: <div id="divId"></div> <script type="text/ja...

Send and Recive an array with jQuery Ajax

I want to send an array from main.html to test.php file and receive an other array from test.php , but it does not work.plz help me! main.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title>Unti...

how does jquery and ajax go together ?

Here is my situation: i have a page once clicking on one of it's divs an ajax request fetches more content to the page. The more content that i am talking about is image gallery content that uses jQuery. my problem is that once i get the response from the ajax request, i manipulate the DOM. therefore the jquery ready() function is no...

Calendar extender wont pop up a calendar

I currently have two calendar extenders on my ASP page and for some reason when they are clicked they do not pop up correctly, I have the TargetControlId set to the appropriate text boxes and the PopupButtonId set to the correct images as well. Is there something else that needs to be set so that this works correctly? ...

Delay load of data for 2 seconds in jQuery ajax

I'm loading the search results via jQuery ajax in a div container. I would like the results to be shown to the user after a 2 second delay or after the user has entered at least 3 letters/characters in the textbox to search. How would I do this? jQuery code: $(".bsearch").keydown(function() { //create post data var postData = { ...

Using ASP.NET MVC & AJAX to do a file upload and preview image.

I am doing what would take me less that 2hours to do in old ASP.Net Web Forms but has left me stumped in how to implement in ASP.Net MVC. Problem: I am trying to put together a really basic admin site about musicians. a musician has a associated picture of them, then some details like name, age, home town alongside the profile pic. real...

ASP.NET MVC 2 Use Ajax to reload a UserControl

Hi, is it possible to use Ajax with ASP.NET MVC 2 to reload a user control, pass along a new Model and have it update all the values that make use of this model without refreshing the rest of the site content? ...

PartialView not clearing after ajax postback

I have this weird thing happening. I have a PartialView with 3 fields on it. I do a jQuery ajax post to my action result and if the model passes validation i save the record. I also then set the model to empty and pass it back to the view as a partial view. public ActionResult jQueryAddComment(Comment comment) { if (M...

jQuery: Firing an AJAX event local to the element that is loading data

I've been playing around with subscribing elements to AJAX events in jQuery. I have an element that I am using to load AJAX response's. This element is only displayed IF there is data pertinent to the current context of the program. So, I thought it would be nice and easy to .show() whenever an AJAX request has completed on it and hide...

jQuery + PHP : Deleting rows from a table from multiple ID's

Hey guys. I am somewhat new to jQuery and javascript in general. What I have is a CMS that I am upgrading. In doing so, I have started an option to delete multiple categories at once via checkboxes, which is processed via jquery/ajax. In deleting the records individually, I could remove the row of the table once deleted, but now with ...

How do I create an associate array in jquery and send it via ajax to get parsed with php?

How would I make an associative array (or some comparable alternative) in jQuery AND send that array via ajax to a php page so that I can use php to handle it? Something like this... // jQuery if($something == true) { data[alt] = $(this).attr('alt'); data[src] = $(this).attr('src'); else if ($something == "something else") { ...

Multiple AJAX requests are not calling onSuccess until all requests are done

Ok, so I'm working on a little photo gallery that will load a set of images using AJAX. Basically it will load a 'loading.gif' placeholder image, make an AJAX request to generate the thumbnail image. PHP page generates the thumbnail and sends a confirmation that the image has been generated and the path of it. My onSuccess should then...

Will static page content wait to load until an AJAX script gets its content?

I'm trying to get off site content and display it on my web site. I have site 1 and I want to display some content from site 2 on site 1. My plan is to use AJAX, on site 1, to load a PHP script, on site 1, that will load the content from site 2 and echo it. Then AJAX would take the echo from the PHP script and display it in a DIV on si...