ajax

Django: How do I go about changing my simple app to use Ajax?

I currently have a web page where the user enters some data and then clicks a submit button. I process the data in views.py and then use the same Django template to return and display the original data and the results. What I would like to do is try to give it a bit more of a modern look and feel. You know the sort of thing, the page doe...

Can I stagger UpdatePanel updates in .NET?

I have a situation in which I select an account and I want to bring back its details. This is a single UpdatePanel round trip and its quite quick. In addition, I need to bring back some transactional information which is from a much bigger table and takes a couple of seconds for the query to come back. Ideally, I would like to put this...

How do you populate a DIV with URL from another domain?

Hi. I know it's not possible on the client to fill a DIV with content from another domain. However, I've used the Google Feeds code and it's pulling information from other domains into a DIV (no iframe) without resorting to server-side code, so I'm assuming somehow it's doable. Thanks. ...

AJAX XMLHttpRequest Error Flag

Hi, I made a query to an address and I got the readyState = 4, and the status = 0. After I read the documentation for the XMLHttpRequest, it says if the status = 0 and readyState = 4, then check the associated error flag. How can I see whats in this error flag to determine the cause of the status not being set to 200? Thanks. ...

innerHTML doesn't work correctly with xhtml in Chrome

Hi! I've got a trouble with Chrome5.0.375.70, but FF 3.6.3 and Opera 10.53 are OK. Below is the line of code: document.getElementById('content').innerHTML = data.documentElement.innerHTML; The data object from the code is a document (typeof(data) == 'object') and I've got it by ajax request to chapter01.xhtml: <?xml version="1.0" e...

jQuery.ajax(): discard slow requests

I've build a livesearch with the jQuery.ajax() method. On every keyup events it receives new result data from the server. The problem is, when I'm typing very fast, e.g. "foobar" and the GET request of "fooba" requires more time than the "foobar" request, the results of "fooba" are shown. To handle this with the timeout parameter is im...

Question regarding Ajax Hacking

All, I have a PHP website written in Zend Framework and MVC. Most of the controller actions check if the request is an Ajax request or not, else they redirect the user to home page. I am thinking about various ways to break that site. I am considering the following scenario: A user creates his own PHP project on his Local machine. Use...

Add class to textbox when invalid, using .Net Validators

I'm working on a multipage form in .Net using AJAX (UpdatePanels). I am stuck right now trying to get a class added to the textbox that is invalid to basically highlight it red. I found a sample online using this code: $("span.invalid").bind("DOMAttrModified propertychange", function (e) { // Exit early if IE because it throws...

Jquery tabs enable tab?

I am trying to enable a disabled tab in Jquery but it doesn't work I have my tabs: <!--Jquery AJAX Tabs Start--> <div id="signuptabs"> <ul> <li><a href="type.php"><span>type</span></a></li> <li><a href="ber.php"><span>mber</span></a></li> <li><a href="ces.php"><span>ces</span></a></li> <li><a hre...

Jquery click function does not load ajax tabs

I have some tabs that load ajax content. When I click on the tabs it loads the ajax content perfectly no issues works exactly like it does in the Jqueryui demos. But when I try and change tab using an onclick function it opens the tab but doesn't do the ajax. Is this a known issue can it be done?? Do ajax tabs rely on the user clicking ...

How to create Share Button to Hi5

Everyone else social networks have a simple method to share anything content. I need create a share button using php/javascript. Can someone help me? ...

WCF - call same service from client and server side

I have a simple WCF service that I call server side from code behind via a service reference. It's used for validation and works and was automatically setup by Visual Studio and is using SOAP I think because the binding is wsHttpBinding. I want to use the same WCF service, but call it client side from jQuery using ajax(). I'm trying t...

Dual AJAX Requests at different times

Alright, I'm trying to make an AJAX Chat system that polls the chat database every 400ms. That part is working, the part of which isn't is the Active User List. When I try to combine the two requests, the first two requests are made, then the whole thing snowballs and the usually timed (12 second) Active User List request starts updating...

Why is loading inline javascript inside views with AJAX bad?

We have a tabbed interface, inside one of these tabs is a privacy form. This privacy form, as well as using an external javascript file for the bulk of its work, also uses inline javascript as it currently relies on dynamic code (in the server side language). formTabs wrapper (ajax tabs without callback functions) ... <script type ="te...

Ajax - Back button?

I have the following jQuery code: $("a").click(function() { if ($(this).attr('href') != '#') { if (strpos($(this).attr('href'), 'mob.php') !== false) { $.ajax({ url: $(this).attr('href')+"&logo=0", cache: false, success: function(html){ $("#ajax").html(htm...

Ajax request ERROR on IE

Hello all! I have a small problem on IE browser (actually on Google Chrome too) I have this js code function createDoc(url) { var xhttp = ajaxRequest(); var currentLocationBase = window.location.href; currentLocationBase = currentLocationBase.substr(0,currentLocationBase.lastIndexOf("/") + 1); var u = currentLocationBas...

javascript as response text

Hi, I have an Ajax function which will retrieve some RSS feed script from server. I put this responsetext in a div using: $("#divId").html(responsetext); I want to execute the script inside the response. Currently, the RSS feeds not showing in the div. Is there any way to do that ? thanks.. responsetext ------------- - <div class="...

AJAX Div Retrieval every 60 seconds

Hello everyone! What I would like to do is retrieve the contents of a PHP file and insert it into a div every 60 seconds, basically refreshing the dynamic div. I've come up with the following code so far, however it doesn't seem to be working. The code is just like this, nothing extra, apart from the MYSQL login. PHP to grab: <?php ...

jQuery set ISO charset to ajax request

Hi, i'm using jQuery for sending ajax requests to the server, but i have some problems with the charset. In the ajax function documentation is written that data is always sent in UTF-8 according to the W3C XMLHTTPRequest standard, so i don't think that jQuery allows you to change the request charset (except if you load a script, but that...

JavaScript apparently waits for each AJAX call before sending another in a loop

Hello. Straight to the point: I have this javascript: for(item=1;item<5;item++) { xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET",'zzz.php', true); xmlhttp.send(); } And in PHP file something like this: usleep(5);die('ok'); Now the problem is javascript seems to be waiting for each ajax call to be completed before send...