ajax

Method for displaying "loading" message

I am using jquery and the getJSON method and I am wondering if there is a way to display a message saying loading before it loads my content. i know with the jquery ajax calls there is the before submit callbacks where you can have something but the getJSON only has like three options. Any ideas? Thanks, Ryan ...

AJAX and forms

I have some forms that communicate with server using AJAX for real reasons: cascade combos, suggestions, multiple correlated selections (e.g. I have {elementary} knowledge of {French} [add], and {good} knowledge of {German} [add]...). I also have some regular fields that I handle trough get. Thing is that once I've made connection to s...

Struts 2 & Dojo files are too heavy and affect site's performance.. Any remedies?

Well.. we've developed a j2ee application using struts2 ajax capabilities. We find that the dojo implementation is quite slow. We did the following things: 1. Custom build of the dojo library. (increased dojo.js from 240kb to 350kb) 2. Took all the static stuff out of the struts jar and kept it outside. The performance was significantly...

To Ajaxify Or Not?

I really love the way Ajax makes a web app perform more like a desktop app, but I'm worried about the hits on a high volume site. I'm developing a database app right now that's intranet based, that no more then 2-4 people are going to be accessing at one time. I'm Ajaxing the hell out of it, but it got me to wondering, how much Ajax is...

error outputting html with javascript

Hello, I have this php code, with which I am trying to generate a popup window that will contain the contents of a html file, however after adding in the script tags, no html is displayed. I tried echoing out $row2, but the word array is printed to the screen and nothing else. <?php session_start(); if (isset($_GET["cmd"])) $cmd = $_...

ajax architecture question

Hello, I have a page with 3 layers, one for navigation, one for database records and one for results. When I click on a database record, the results are displayed in the result layer via ajax. For navigation, the links will simply be different queries. I am wondering if it would make sense to have each different query be sent as ajax da...

Loopback jQuery AJAX Request

What is the best way to build a loopback URL for an AJAX call? Say I have a page at http://www.mydomain.com/some/subdir/file.php that I want to load with an AJAX call. In Firefox, using jQuery this works fine: $.post('/some/subdir/file.php', ...); Safari/WebKit tries to interpret this as a location on the local filesystem (so it en...

Cross-site AJAX requests

I need to make an AJAX request from a website to a REST web service hosted in another domain. Althouht this is works just fine in Internet Explorer, other browsers such as Mozilla and Google Chrome impose far stricter security restrictions, which prohibit cross-site AJAX requests. My problem is that I have no control over the domain nor...

HTTP HEAD Request in Javascript/Ajax?

Is it possible to do a HTTP Head request solely using an XMLHTTPRequest in JavaScript? My motivation is to conserve bandwidth. If not, is it possible to fake it? ...

Javascript To Get An Alert When Closing The Browser Window

Hi Guys, I tried following code to get an alert while closing browser window. <script language="JavaScript" type="text/javascript"> window.onbeforeunload = confirmExit; function confirmExit() { return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, you...

Testing for an empty array object in JSON with jQuery

Hi, I have a request that returns a JSON object with a single property which is an array. How can I test if the array is empty? With jQuery code like: $.getJSON( jsonUrl, function(data) { if (data.RoleOwners == [ ]) { $('<tr><td>' + noRoleOwnersText + '</td></tr>').appendTo...

Can Google's AJAX API feeds be custom animated?

Has anyone had any luck customizing the feed animation? Ideally I would like a left-right marquee animation. Any thoughts would be appreciated. ...

Javascript + IMG tags = memory leak. Is there a better way to do this?

I've got a web page that's using jquery to receive some product information as people are looking at things and then displays the last product images that were seen. This is in a jquery AJAX callback that looks pretty much like this: if(number_of_things_seen > 10) { $('#shots li:last-child').remove(); } $('<li><img src="' + p.Produc...

FileUpload Using Ajax In ASP.NET With C#

Hi Guys, I need to upload images using FileUpload without postback(using Ajax).I tried many examples.But in all postback is coming or they are using PHP.Can anyone help me to do single file upload or multi file upload using ajax in ASP.Net with C#. ...

How to implement a minimal server for AJAX in Python?

I want to create a very simple HTML/AJAX based GUI for a Python program. So the frontend is a HTML page which communicates with the program via AJAX. Can you give me a minimal implementation for the server-side using the python SimpleHTTPServer.SimpleHTTPRequestHandle? A simple example would be a textfield and a button. When the button ...

No image, and no popup window

Hello, I hava an ajax application that will not display an image, or make a popup window from html stored in a file. This is the code I am usiong for the popup: echo '<script> function makewindows(){ child1 = window.open ("about:blank"); child1.document.write(' . json_encode($row2["ARTICLE_DESC"]) . '); child1.document.close(); } </s...

Implementing Forum Live View with Ajax and JSP

I'm starting a personal project, so I have at the moment complete architectural/design control. I'm just planning out the structure at this point. My goal is some sort of web forum, chat thing. The difference is it should update live, new posts growing on client views soon after they've hit the server. I think to use ajax and jquery ...

Is it possible to integrate AJAX toolkit into MVC applications?

How do I integrate AJAX toolkit into MVC applications in .net? ...

Hidden panel doesn't center correctly when displayed

I've got a simple AlwaysVisibleControlExtender that extends a small Panel containing a "Loading..." message and animated GIF. The whole thing is inside an UpdateProgress control, so it only displays when my app is processing. I've got it set to display at the top center. It works fine, but I've noticed that it displays slightly to the ri...

Anything wrong with adding the PUT,DELETE verbs to the .aspx extension in IIS?

I'm using PUT and DELETE more and more w/ my ajax work and wanted to see if it would be a "bad idea" to add these verbs to the .aspx application extension in IIS. ...