ajax

How to clear the value of a javascript variable?

I am using a javascript var to control the running of an ajax call. The call is triggered from a click event (on "#week_tag" div)and only needs to be run once per page load. The same click event also toggles the display of the sliding pane ("#week_summary") where the data from the ajax call is shown. In the example below, I'm trying...

Progress notifications from HTTP/REST service

I'm working on a web application that submits tasks to a master/worker system that farms out the tasks to any of a series of worker instances. The work queue master runs as a separate process (on a separate machine altogether) and tasks are submitted to the master via HTTP/REST requests. Once tasks are submitted to the work queue, clie...

Can someone recommend me a good image upload script.

Hi everyone, I'm looking for one of those fancy upload scripts you see on some sites that upload the file the moment you select it on your hard disk, and optionally allows you to crop to a portion of the original image. We use PHP and Prototype (so preferable no jQuery plugins... even though we should probably switch). We currently ha...

How do you deal with saving an attribute related to an object not yet created, via AJAX?

I have an object that hasn't been created yet (so it has no ID), but the user is in the process of filling out fields to create it. For one of the fields, they create an attribute for this object, but that attribute requires the object's ID. That's where the issue is -- since the object hasn't actually been created yet (the user is in t...

jQuery not updating div

I have an element like this: <div id="foo_<?php echo $id;?>" class="hidden"></div> I'm trying if ($("#foo_ " + id).is(':hidden')) { //stuff $("#foo_ " + id).html(html).slideDown('fast'); } I've checked repeatedly, the div foo_233 is being found in firebug and is being shown as hidden. The id is passed on to the javascript f...

Good design and good user interface ASP.NET Ajax applications?

I like to get inspiration from using web applications that make good use of new technologies. This time I would like to check out ASP.NET based web applications that make heavy use of Ajax & Ajax Toolkit for line of business apps (data bound controls like grids). I checked out some apps at CodePlex but didn't see anything cool enough. A...

Flash - AJAX call

I want to call a web page from Flash and use the data returned from it (either in plain text or XML). I see with the NetConnection you can connect to a web service, but I just want to call a plain old web page. It seems like I managed to do this a while back, but for the life of me, I can't find the answer on the web. Does anyone know...

Firefox 3: Enable AJAX to localhost from outside domain

Hello, I am running a HTTP server on my development machine. I have a website, on some web server on the Internet. How can I get Firefox to allow communication from this website to localhost temporarily while I develop? Thanks, Isaac Waller ...

Twice postback in ASP.NET

Hi, My page is fully postback twice. I am using master page with AJAX. The structure of master page is as follows. +---------------------------------------------+ | Web User Control with AJAX Tab Control | +---------------------------------------------+ | | | | | Col1 | ContentPlaceHol...

How can I access the properties of an anonymous object?

$.post("test.php", { name: "John", time: "2pm" }, function(data){ alert("Data Loaded: " + data); }); The object { name: "John", time: "2pm" } is anonymous. Normally, I would access the properties of an object using syntax similar to the following: objectname.propertyname But what can I do when there is no objectname? How can...

Servlets and AJAX communication

hi there, i do have a communication probleme here between my java servlet and an ajax request. more about it: Absolute path to the index.html (including javascript/ajax request): http://localhost:9080/chat/index.html In the same folder the servlet: MyChat.class And the Request is working like this: var url = "http://localhost:9080/...

Ajax Security Question: JQuery ajax() + PHP scandir() = Security Issue??

I'm a beginner with PHP security issues. Someone reported a security issue with my code, but never gave details. Below is a condensed version of the code. I'm using the JQuery AJAX function to send some data to the server where it's used by the PHP scandir() function. Do you see any security issues? HTML Document <script src="h...

JQuery: Thumbs up and down rating system?

I'm want to implement thumbs up and down rating system in my web app using jquery. Please tell me some plug-in or code how to implement the thumbs up and down rating system in my website, please share links or resources. Thanks ...

jquery ajax parse response text

Ok this is really frusturating me because I've done this a hundred times before, and this time it isn't working. So I know I'm doing something wrong, I just can't figure it out. I am using the jQuery .get routine to load html from another file. I don't want to use .load() because it always replaces the children of the element I'm load...

cakephp with jquery .load

hi, i've got a problem, i'm using cakephp and im loading into a div a page function loadContent(targetDiv, sourceUrl) { $(targetDiv).empty().html('<img src="/gambu/img/ajax-loader.gif" />'); $(targetDiv).load(sourceUrl); } it work's ok, but in a loaded page i've got autocomplete and thickbox, and that's not workin...

jQuery Cross Site Fetch

Hi, I feel like this is easy but I am missing something... Using jQuery, I am trying to fetch a remote page (on a different server), capture the HTML contents, and inject that content into a hidden DIV. However, using either $.ajax or $.get results in a cross-site scripting error in FireFox. Any suggestions? Code: $.ajax({ t...

How to test a URL in jQuery

Hello, I have a URL which I want to open in a FancyBox (or any other overlay-type pop-up). I don't know in advance whether URL is good, so I want to test it. If invalid - I won't attach the fancyBox plugin to that particular URL, it will just be a regular link. How can I test a URL before attaching a plugin to it? Tried doing something ...

Why is a 0 being appended to the results of my ajax .load() call from jQuery?

I'm using the .load() function in jquery to insert the results of a php file to an element. My code looks likethis: $('#edit .postcontent').load('admin-ajax.php', {'action':'qe-getpost'}); Everything works great - the returned value is loaded into .postcontent perfectly. However, a 0 is appended to the end. Every time. Even if I ret...

Possible to do client-side HTTP push?

Pretty much the opposite of server-side push, also known as Comet. I'm wondering if it is possible to use long lived HTTP connections to push information to the server. Unlike a simple XHR, the connection would be kept alive and data would be streamed to the server at intervals, as the user completes actions etc. Using standard techno...

jQuery, WCF and ASP.NET

Hi, Apologies if this is a dumb question. In previous ASP.NET projects, I've been using jQuery to communicate with an ASMX web service without a problem - including having the ability to enable interaction with the user's session state. I'm now dabbling in the world of Visual Studio 2010 and .NET 4.0 and I'm trying to do the same sort...