ajax

IE is losing input values after ajax response

Hello, I have a div, and content of this div is updating on every ajax request. The problem is when I'm using IE , I'm losing all input values. For example: 1) I have no content in the div. 2) I'm getting the content using ajax request. 3) I have a <input type="hidden" name="hotels_id" value="2"> after that request. 4) I'm po...

Howto create a AJAX request with JavaScript that contains both file and post data

How can I create a HTTP request that sends one file and some post data with JavaScript that can be received by a PHP server? I have found the following suggestion but it does not seem to be complete xhr.open("POST", "upload.php"); var boundary = '---------------------------'; boundary += Math.floor(Math.random()*32768); boundary += Mat...

Persistent database connection for Ajax Calls

I have ajax call which pulls from the processing script 'getajax.php'. Call is made to 'getajax.php' script which has the db connection details, select, functions, etc. My question is: Everytime a call is received by 'getajax.php' it will go through mysql_connect, mysql_select, then queries. Is this the correct aproach to handle thou...

CodeIgniter + jQuery .ajax form submit return results in a table row

Hello I think it should be fairly easy, I simply can not find an answer for it. I am using a Codeigniter for a simple CRUD application. It displays the result in table. What I did, was to use jQuery .ajax to submit the form. It works (almost) perfectly. I am able to submit a form without reload but the results are not shown unless I...

How to stop concurrent ajax calls

Ok so I have an autocomplete field that is making an ajax request every keystroke....which can slow things down alot. If you visit here and use the email: [email protected] pass: test12 If you have firebug open and start typing fast you will see all the see all the ajax requests. My question is can i cancel the previous request if there ...

What technology behind Jango.com

Hi, I would like to know what technology has Jango use to stream the music with out breaking. Also the UI seems pretty cool..is it flex or something? Mainly how they maintain that music doesn't get drop..if i play a you tube video with my internet connection it needs to pause some time to load..but the songs in this site doesn't. I gue...

jQuery AJAX request gets called twice when using Jquery, Django and Google App Engine

I'm using Google App Engine, Jquery and Django. I want POST data to be sent to the server side when a form is submitted, and I do this in JQuery with the following code: $("#listform").submit(function() { $.ajax({ type: "POST", url: "/xhrtest", data: {'name': 'h...

Validate form client-side, server-side or both in Ajax form?

I'm developing this app which as a very basic Ajax form and I'm currently validating the form input through jQuery with it's default validation plugin. I'm wondering if I should also do server-side validation after submitting the form or just ignore and assume everything is right since the client-side validation was successful? There's...

is it possible to get the current location (url) of an external page loaded in a jqModal window?

Dear all, As the title, is it possible to get the current location (url) of an external page loaded in a jqModal window? And further, in the implementation of the jqModal, in where the external page is located? iFrame or div? Thanks for your kindly advise. BRs, William Choi ...

HTTPrequest is not working!

Hi! I'm trying to use an ajax request to connect, and gather data from, a PHP file. THe AJAX JS is on a different website than the PHP, just an FYI. Here is the JS: var quer; try { quer = new XMLHttpRequest();//I'm running in safari, so this gets called. } catch (e) { try { quer = new ActiveXObject("Msxml2.XMLHttp"); }...

Is there a better way to do this ajax call

$('#request_song').autocomplete({ serviceUrl: '<%= ajax_path("trackName") %>', minChars:1, width: 300, delimiter: /(,|;)\s*/, deferRequestBy: 0, //miliseconds params: { artists: 'Yes' }, onSelect: function(value, data){ artist = $('#request_artist').val(); //this will return "The Killers" //make an ajax request to "...

How can you tell in FireBug what JavaScript is being sent back from the server after an Ajax request?

In my HTML I'm sending a dollar amount back to the server to have its currency changed in the app. How can I tell in FireBug what JavaScript is being sent back from the server after this Ajax request? ...

I have a json object now how do I make a div with the elements

I am using getJson to pull in some info onto the page $('#request_song').autocomplete({ serviceUrl: '<%= ajax_path("trackName") %>', minChars:1, width: 300, delimiter: /(,|;)\s*/, deferRequestBy: 0, //miliseconds params: { artists: 'Yes' }, onSelect: function(value, data){ // alert('You selected: ' + value + ', ' + $('#...

Page_load fires twice for UpdatePanel refresh whilst having a jQuery bound change event on a drop down list

I've tried to wrap up my problem with a complete example below - the original problem is part of a jQuery plug-in that I'm writing to extend the behaviour of an ASP.NET ajax application I already have. The aspx page below has one drop down list which is marked for auto post back. I've also bound a change event using jquery (which ultima...

css in IE after ajax returns value

Hello, I use ajax to return html code and append it to a div layer: $(div_layer).append(ajax_value); ex: <br/> <div id="divName"><br/> --value appears here--<br/> </div > I can successfully append the code to the div layer, but the css attributes are lost ONLY in IE. eg: border-color, border-width. help me out, thanks edit: ...

Does refreshing mysql query by jQuery ajax crashs the database?

Hello I'm using jQuery .ajax function to load php page with a mysql query in it that selects data from the database, but my question is: Does refreshing mysql query by jQuery ajax crashs or tiring the database? Info: Refreshing by 1 second using setInterval(). Edited: This the queries that I use to refresh them. SELECT * FROM table1 ...

Rails Ajax Hide/Show Toggle Link using RJS

Hello, I want users to be able to comment on submissions. Below each submission I want there to be a link that says "Comments (2)"...when you click on this link it dynamically loads in the comments, as well as a simple form to add a new comment. When the user submits a new comment I want it to load asynchronously in at the bottom of the...

Open Fancybox (or equiv) from form imput with a href

Hello all. Attempting to open a Fancybox once a form is submitted. I am also trying to do an ajax call to a php script ... don't exactly know where to put that in. Here is the code. If anyone has any ideas I would really appreciate it. As you can probably tell I have no idea what I am doing with AjaxForm. <!DOCTYPE html PUBLIC "-//W3C...

jQuery html response

Hello, Is it possible to determine if a response returned by $.ajax was served from the browser's cache or was fresh? Thanks. ...

Javascript cache

Hi all, I need to get a large amount of data back from a server via ajax. It will take a bit of time to get to the browser. The second time the user goes back to same web page I don't want them to have to download the data via ajax again. Is there anyway Javascript can write the json data to the browsers cache or filesystem reliably? C...