I'm using global variables to pass around a response from a AJAX call:
window.response = null; // most recent response from XMLHttpRequest
// the callback function for XMLHttpRequest
function userObjFromJSON() {
if (this.readyState == 4) {
var json = eval('(' + this.responseText + ')');
window.response = json;
}...
Like so many lost souls before me, I'm floundering in the snake pit that is Ajax form submission and IE browser caching.
I'm trying to write a simple script using the jQuery Form Plugin to Ajaxify Wordpress comments. It's working fine in Firefox, Chrome, Safari, et. al., but in IE, the response text is cached with the result that Ajax i...
My JavaScript sometimes crashes on this line:
var json = eval('(' + this.responseText + ')');
Crashes are caused when the argument of eval() is not JSON. Is there any way to check if the string is JSON before making this call?
I don't want to use a framework - is there any way to make this work using just eval()? (There's a good reas...
Hi there!
I am a beginner using ajax and I always thought that it is completely asynchronous. But I discovered that a call can be interrupted by a page reload or a page change (like clicking on a hyperlink). I was under the impression that when an ajax call is started, it is carried out no matter what the browser does afterwards. Is tha...
Understanding that if someone had JavaScript disabled the site would not work then is there any other reason not to do this?
I am in the design phase of a new site and want to make it easy to change the server code without having to change the UI - just like a form.
This is using Python server side.
...
I'm using prototype to make Ajax requests. Occasionally the responses contain malformed XML. Prototype is using the onException callback, but the first error that is thrown is when I am trying to access a particular node.
I know Firefox recognizes the malformed response, because if I request the xml via the address bar, Firefox presents...
I'm playing around with the jQuery Week Calendar and am trying to get this to work, but I can't figure out why this is throwing an error.
The calendar has a method that returns a list of events to populate itself with.
The method (which uses preset events for demo purposes) looks like this:
function getEventData() {
var year = n...
Hello.
I have standed out for awhile now with a thing i want to do.
Thing i want to do is to display a message(confirmation, "You have earned 2 points") at the top (message like stackoverflow).
Ive did this storing a confirmation message using session variable, and then at index.php there is a ajax script that loads session.php each 1...
Hello,
this is probably so trivial that I'm ashamed to be asking this...
Why in the world is this not working?
<?xml version="1.0" encoding="UTF-8"?>
<filter id="4" max_values="10">
<value id="9">strategy</value>
<value id="11">simulation</value>
<value id="12">shooter</value>
</filter>
This is the xml response I get when...
Hi folks,
I'm still pretty new to AJAX and javascript, but I'm getting there slowly.
I have a web-based application that relies heavily on mySQL and there are individual user accounts that are accessed and the UI is populated with user specific data.
I'm working on getting rid of a tabbed navigation bar that currently loads new pages...
hi my dear friends:
i ajaxified my RadGrid like this :
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="grdPersonel">
<UpdatedControls>
...
Develop a elegant Pub-Sub architecture in web-oriented-apps is a real challenge.
Although there are some very interesting solutions using long-polling-connections (e.g. COMET) and repetitive-timeouts (e.g. js setTimeout). IMHO AJAX push still looking like a layer of tweaks and hacks forcing the innocent HTTP protocol.
So what do you thi...
Hello. There is an issue that I cannot solve, I've been looking a lot in the internet but found nothing.
I have this JavaScript that is used to do an Ajax request by PHP. When the request is done, it calls a function that uses the Google Visualization API to draw an annotatedtimeline to present the data.
The script works great without...
EDIT: This question was initially too general, I think. So What I really need is a very good tutorial on how to implement the Load More function on Safari for iPhone just like the Twitter website(mobile.twitter.com) does. Just a wordpress plugin won't really help. But if the plugin is well explained, like if it is wptouch, home(that also...
i've used .load() with jquery to call a php file that will return search results back into a div below a search input bar, but in the div, using TAB or down arrow will not cycle through the results.
It's apparent the key controls don't know the new div of results exists.
What am i looking for exactly to fix this?
I've called my php ...
I would like to implement a search box in my website that is similar/identical to that used on LinkedIn i.e. category search, auto-complete dropdown, etc. I would like this to be jquery + ajax based.
Is their any code available for a LinkedIn-type search feature?
If not, does anyone have good advise on how to re-create this serach funct...
Let's say I have a "report" page that can be customized via Javascript. Say I have start_date, end_date and type ("simple", or "full") that can be changed. Now I want the address bar to always contain a "permalink" of the current (customized) view, so the user can easily copy it.
If I'd do this without Ajax, I would simply use something...
I am new to jQuery and I have the following problem.
My project has say 2 pages, 1.JSP and 2.html. Now I want to pick selected data from 2.html and use it on 1.JSP. Now this was achieved very easily using .load but I want the data to be present in a JavaScript variable rather than put it on the page (div tags, etc.), so that I can work ...
Hello everyone.
I'm trying to write simple web application using Tornado and JS Prototype library. So, the client can execute long running job on server. I wish, that this job runs Asynchronously - so that others clients could view page and do some stuff there.
Here what i've got:
#!/usr/bin/env/ pytthon
import tornado.httpserver
impo...
I need to do as much as possible on the client side. In more details, I would like to use JavaScript to code an interface (which displays information to the user and which accepts and processes response from the user). I would like to use the web serve just to take a date file from there and then to send a modified data file back. In thi...