ajax

Stop the browser "throbber of doom" while loading comet/server push iframe

When using Comet, or Ajax Long Pull techniques - an iframe is usually used. And while that iframe is waiting for the long connection to close, the browser is spinning its throbber (the progress/loading indicator). Some websites, for example etherpad.com, managed to make it stop. How do they do it? ...

Embed Web Widget(?) in Web Page

We have customers that create small intranet applications on servers we provide them. The servers also house various (windows/.net based) systems we have created. We need to provide our customers a "one-liner" piece of code that will allow them to embed functionality into their web pages. Similar to how Google Ads works when they ar...

Is ajax breaking my javascript objects?

I have a page that does ASP.NET ajax postbacks using UpdatePanels. In some javascript, I set up some objects in the window.onload event, which works great. When I do a postback though, it seems like my objects are messed up. One object which was receiving events from a table, is no longer receiving the events. I also had a case where...

How do I force or add the content length for ajax type POST requests in Firefox?

I'm trying to POST a http request using ajax, but getting a response from the apache server using modsec_audit that: "POST request must have a Content-Length header." I do not want to disable this in modsec_audit. This occurs only in firefox, and not IE. Further, I switched to using a POST rather than a GET to keep IE from caching my re...

Ajax using JS, but WITHOUT XMLhttp AND using the same socket every time?

Is it possible to communicate and update data in a page without reloading, but without using the XMLHttpRequest object, AND sharing the same connection or socket every time (so, without closing the connection for every request)? ...

WCF & ASP.NET: Duplex Support using AJAX.

I know that WSDualHttpBinding, NetTcpBinding, and NetPeerTcpBinding bindings all support duplex/callback service operations. I can't find anywhere on the internet anyone even asking if duplex is somehow supported for ajax calls. Maybe the reason for my inability to find anything on this is because I am completely misunderstanding some k...

ASP.net Ajax and JQuery - partial postback

A radiobutton list and a repeater are in an updatepanel. The repeater is using a jQuery tools plugin - scrollable. The scrollable plugin works after the initial page load. It does not after I click on a radio button. I put in an input button to run the script below after a partial postback and the scrollable functionality works a...

json array: How to create new array elements?

My aim is to get a json array like this one: var args = [{ name: 'test', value: 1 }, { key: 'test2', value: 2}]; How can I get the below code to build up an array like the above one? this.dependentProperties = []; //array function addDependentProperty(depName, depValue) { dependentProperties.push(new Array(depName, depValue))...

check if javascript is enabled and display a message if it is not using an asp custom control

Hi, I'm using Javascript, ASP.net and c#. I want to write a custom control to check if javascript is enabled on the browser and display a message. I'm using the following approach: -the control shows a message "Javascript disable" in a tag -the control adds in the section a javascript section with this line: window.onload = function()...

call javascript from python

I want to execute this script (view source) that uses Google Translate AJAX API from python, and be able to pass arguments and get the answer back. I don't care about the HTML. I understand I need to embed a Javascript interpreter of some sort. Does this mean I need to have a browser instance and manipulate it? What is the cleanest w...

How can I do some server-side processing after a button click and then redirect user to a page and POST variables to that page?

I've got a product page set up where you click a product (radio button) and click checkout with Paypal. What I'd like at this point is to create the purchase in the database (add the table row with purchase details, minus the Paypal receipt id), then send the user to Paypal to pay. When user returns to the site the receipt id will be add...

Load raw image data using AJAX

I'm trying to do a bit of facebook integration with a website, and there's a particular call on the facebook api that post's a picture onto a users account. One of the parameters is the raw image data. The image is stored locally on the web server and I have a url to it. I was intending to load the image on the client using javascript un...

javascript and element location

Hi, I want to get up to speed on element location and javascript. ie. if someone clicks on an element, I can show a menu just below that element. Now I realize I have to account for the fact that if someone clicks on a element to the extreme left/right or bottom of the page, I have to know if the menu is visible on the screen properly...

Is this a correct way to return JSON in Python/GAE for parsing in JavaScript?

I am making an API for some AJAX related things in my web app on GAE in Python. After setting the content-type to 'application/json' and accessing my url directly- http://mysite.com/api?method=theMethod&param=firstParam -I am being prompted with a 'save file' dialog box instead of seeing the JSON object displayed. The file contain...

How do i open ajax request in separate frame?

Okay, I have this code: <script language="javascript" type="text/javascript"> <!-- function requestPage(page) { var request = false; try { request = new XMLHttpRequest(); } catch (e) { try{ request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ re...

Bing image search paging - infinite scroll

When you search for images on the Bing search engine, the result is displayed like this: http://www.bing.com/images/search?q=stack+overflow Notice how you can keep scrolling and scrolling and there is not "normal" paging. My question is: How do they do this? I can see there is some ajax/javascript events happening, but the code is not...

In an ASP control how can I get the text in a <Contentemplate> tag in the control code?

Hi, In my page ASP.net page I'm using a custom control like this: <MyNamespace:MyControl runat="server" ID="myControl"> <contenttemplate> This is the text I want to use </contenttemplate> </MyNamespace:MyControl> In the c# code of the control how can I obtain a string containing the text between the <contentemplate> tag (eg. "This is ...

Cross domain ajax response failing

Ok...so ive been wriggling around with this piece of cod for quite a while now... first i used this code which worked... $(document).ready(function() { $('#content').html(''); $.ajax({ url:'data.json', dataType: "json", success: function(data) { $('#content').append(''+data.rank+''); } }...

Jquery Ajax to [WebMethod]

Hi all, I'm posting the following to an asp.net [Webmethod] using jquery via the $.ajax method. I've trapped the data being sent over the wire. {number:01502,numberTypeId:2,companyId:531} I've break pointed inside the [Webmethod] and the number is being returned as 1502 even though the parameter type is string, I'm guessing this has s...

Serve a dynamically generated image with Django

How do I serve a dynamically generated image in Django? I have an html tag <html> ... <img src="images/dynamic_chart.png" /> ... </html> linked up to this request handler, which creates an in-memory image def chart(request): img = Image.new("RGB", (300,300), "#FFFFFF") data = [(i,randint(100,200)) for i in range(0,300,1...