ajax

multiple ajaxStart

hi, in my page i have two places i want to use ajax request but when i pressed one of them the second's loading starts too... my codes like this, i want to work them when the related form submited. jQuery(document).ready(function(){ jQuery('form#comment').submit( ajaxProcess2 ) jQuery('div#alert').ajaxStart(function (){ ...

How to use FTP with ajax?

Let's say I'm connecting to an FTP by sending an ajax request to PHP: $connection = ftp_connect($server); $login = ftp_login($connection, $ftp_user_name, $ftp_user_pass); After this request I want to upload a file: $upload = ftp_put($connection, $dest, $source, $mode); Is there a way to keep an FTP connection to the server on the c...

Please help me with this ajax/javascript/php

Hey guys, I am trying to create a chained list here. I want the user to choose something on the first 4 drop down list and once the last one is chosen, another one is supposed to pop up. I am just testing my code right now and for some reason the my codes are not showing the dropdown list that is supposed to be shown when the last inpu...

.net mvc & ajax forms - how to handle session expired

I have a customer filter attribute to check for expired session in my .Net MVC application which works fine on a standard html form. However, when I apply the attribute to an action that is called by an Ajax form and the session is expired, it reloads the login page (where the filter attribute redirects the context) into the ajax update ...

SEO way to handle ajax requests used for reporting

We would like to perform some link tracking in our application but I am unsure of the proper way to handle this. For example with on our search results page we obviously have a bunch of search results. We would like the link for each item to: a) link to the actual item description b) fire off an ajax request to a url that handles link ...

Download CSV file using "AJAX"

Hi, I'm trying to accomplish a fairly simple task for my website, but I"m not sure exactly how to go about it. I want the user to be viewing a table, then click a button, at which point the user can save the contents of that table as a csv file. This request can sometimes be quite complicated so I generate a progress page to alert the us...

PHP Mail & Ajax: Message does not contain any form data

I'm using jQuery's AJAX function to send a message from a contact form - $('form button').click(function() { $("input").removeClass("error"); $("textarea").removeClass("error"); var name = $("#name").val(); if (name == "" || name == "Name" || name == "Namn") { $("#name").addClass("error"); $("#name").focus(); return false; } var emai...

Jquery ajax with facebook social graph json

Hey all, I'm trying to create a feed using jquery ajax and requesting data from facebooks social graph using json method. Can someone please tell me why it isn't working? i've tried $.getJSON(); to no luck! This is the code I have just tested and still no luck: $(document).ready(function(){ var url = "http://graph.facebook.co...

Using JS setTimeout to post AJAX requests in a loop, but setTimeout gets called far too often

This question has been answered. The problem was that myEventMoveTrainManaul() was being called from other locations within the code. Thanks to everyone who offered their help. Please forgive me for re-posting this, but it was getting almost no attention and it's very important that I find someone to help me with this. Thank you for you...

AJAX error handling with jQuery: should I use $.ajaxSetup() or $.fn.ajaxError()

I want to alert the user whenever there's an AJAX error. You can do this via $.ajaxSetup: $.ajaxSetup({ error: function() { alert("OOPS!") } }); But the jQuery docs recommend against this: Note: Global callback functions should be set with their respective global Ajax event handler methods-.ajaxStart(), .ajaxStop(),...

What tools exist for tracking down IE7 javascript problems?

I am trying to debug a large and complex webapp that makes heavy use of DIVs, AJAX, dynamic HTML and server-side code to do its job. Under normal operation we do not have problems. However, when we put the webapp into an IFRAME, certain functions trigger a crash in IE7 that renders the browser inoperable (all CPU used). What tools exi...

Ruby on Rails: + AJAX: How do I set the value of a field

there is page.replace_html "id", thing to replace it with but is there something where I can just insert a value into a text field? ...

JQuery $(document).ready ajax load

I looked at quite a few of the related questions and I must be asking this completely different as I saw only a few that seemed to relate. I am loading an entire middle div via JQuery Ajax call and I simply want to be able to do some automatic JQuery on that new area like $(document).ready allows when a DOM is being loaded. I read that l...

is there a way to make the browser reload my javascript code after an ajax call

how can i make the browser re-evaluate all my javascript after i make an ajax call. i am using mootools framework and i would like to reload the javascript added at the header portion of my html page ...

Any dedicated servers that serve up JSON?

I'm looking to retrieve json from a dedicated server. It will be used to verify client to server communications in my Ajax monitor application. [EDIT] LOL! Even I couldn't of begun to answer this vague question. Sorry was in a rush when asking question. Context: The ajaxMonitor program wraps the JQuery.ajax function. It is a plug-in...

Segmenting AJAX responses in perl CGI?

Is it possible for a perl cgi script to segment its AJAX responses into numerous individual HTTP responses? Say I have this code: xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { onDataReceived(xmlhttp.responseText); } else if(xmlhttp.statu...

AJAX back button implementations: how do they work?

My page so far loads once, and then it's all AJAX from there, baby :D. So obviously, back/forward/reload/history/bookmarking seriously breaks it. I'm researching some solutions (I'm eyeballing jQuery plugins, aka BBQ or Address) and I'm curious to how they are implemented. All that I am seriously interested in is Back/Forward functional...

using ajax in rails with periodically_call_remote

I am attempting to reload a partial on a page periodically but it does not seem to be working. The partial loads correctly when I first load the page but it will not update when I introduce new info to it without reloadig the page. The view looks like: <div id="menuarea"style="height: 399px; width: 181px"> <%=periodically_call_remot...

Ruby on Rails jQuery Visual Effect

I am working on a search function on RoR that basically just has a cool visual effect when a user clicks the search button. Here is the code in my view for search.rhtml <html> <head> <title>Tutor</title> <%= javascript_include_tag :defaults %> </head> <body> <h1></h1> <%= form_remote_tag :url =>{ :action =>...

Real time graphing with flot, mysql, php

Hi, I'm trying to draw a real time graph as my mysql table is constantly being inserted with values, like a moving graph referenced from http://kalanir.blogspot.com/2009/11/how-to-plot-moving-graphs-using-flot.html The values actually come from a carbon dioxide sensor which updates the value of the table with co2 values with positions i...