ajax

Delay in receiving Ajax results using jQuery

I have a simple jQuery Ajax call which gets HTML results from a PHP file (which just executes a mysql query and formats the results in a list). The problem I'm having though is that this whole Ajax call takes about 12s to execute (the 'Waiting for Response' time in Firebug is 12.3s), but when I just load the PHP page with the same URL p...

Ajax Popup alert

I'm looking to do functionality similar to Stackoverflow where in certain instances I want to show a user important info like: You have 2 new answers and 1 new comment. See your responses. This shows up in a orangish div on the top of the screen as a sort of alert and has a X on it to kill the window. I would like to do this using jQu...

Return value from ajax call?

Hi, I'm making a basic ajax function in jquery which echoes the number of rows found in a MySQL Query. function checkEventIDClass(id) { var params = 'method=checkEventIDClash&table=test&id=' + id; $.ajax({ type: "POST", url: "ajax.php", data: params, ...

How to send a server error response using php?

Hi all, As soon as the user clicks the delete button my jQuery script asks the server to delete the selected item. Now I want my php script to send a success or an error response. Is it possible to fire the error callback in case the item could not be deleted? Thanks my jQuery code: $.ajax({ type: "post", url: "myAjax.php" , d...

jQuery .live('click') only binding to first element on the page

I wrote a jQuery plugin that binds to 8 elements on a page, and I wanted to use .live() to bind the click action to a link in each element. When you click the link it should post a form using ajax. The problem is that all the links for all 8 elements submit the form for the first element on the page. When I use .click() everything works ...

[ASP.net AJAX] Modal popup extender is rounded locally but not on the server

ASP.net ajax 2.0 I've got a modalpopup extender that looks like this: The actual modal popup is wrapped around a rounded corner extender to give it the nice curved look. Here is a simple snippet of code: <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" CancelControlID="btnCancel" OkControlID="btnOk" TargetCon...

CKEditor: Strange Characters after ajax submit

I am using ajax to gather the CKEditor content and submit it to the server. Once I look at it after it is submitted, all the html tags < and > have been converted to their html entities. This is not what I want, as I obviously need to preserve the HTML. Is there something I did wrong? ...

deleting session data via ajax

Of course we can do this, but is it alright to do so? Are there any downsides of this approach? ...

Providing feedback to user during long actions...

I've developed a web application in ASP.NET and one of the things the user can do is a long task. Basically, this task will collect all data in the database and convert it to a specific XML format. This XML is then stored in the database again as a "snapshot" of the data. (So, it doesn't return the XML to the user.) Unfortunately, this ...

Use javascript and php via ajax to run MySQL queries

I was looking through some code on a project of mine and thinking about all the php pages that I call with ajax that just run a simple update or insert query and it made me think. What if I could essentially run an insert or update sql query from javascript. assuming I am using the prototype javascript framework for ajax and php on the ...

Using ajax to send GET to php file after change to input

I have a series of dynamically generated inputs that I need to have ajax update in a php file for me once the user clicks off of the input. I think I have the right code, but it's not working for reasons beyond my understanding. I'm a complete javascript/ajax noob, so be gentle. The js/ajax: <script type="text/javascript"> // Initial...

How to get the jQuery $.ajax error response text?

Hi all, I am sending an error response to my jQuery. However I can not get the response text (in the example below this would be Gone to the beach) The only thing jQuery says is 'error'. See this example for details: php <? header('HTTP/1.1 500 Internal Server Error'); print "Gone to the beach" ?> jQuery $.ajax({ type: "post", da...

Update Panel Problem

When Click on button I got this error in firefox error concol and i am using ModelUpdate Process for refreshing the page with Script manager and Update Panel and because of this error image of Processing continue on screen using ModalUpadateProcess Error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent....

How would I use AJAX to determine if the user's session has expired and then return them to the login page?

In the following scenaio, how could I make use of AJAX to check if the session if is still active and then return the user to the login page? The user logs in and starts working The user disappears for 10 minutes and the session times out The user returns to their computer and is still on the screen they were on 10 minutes ago The user...

any good books on scalable web applications (Java/Ajax/REST)?

Are there any good books on the subject worth reading and still up-to-date with current technologies? I'm mostly interested in back-end architecture and things I should consider choosing clustering and database solution as I plan to use GWT for the front-end therefore won't be able to control a lot there. I'm looking for a book which w...

The best way to synchronize client-side javascript clock with server date

I have a task to show digital clock (with minutes precision) on HTML page in some fixed timezone (MSK or MSD - depending on current date). I'd like to avoid relying on client system clock, so some synchronization with server is required. HTTP server sends Date header in each response so we can send an AJAX GET or HEAD request to any URL ...

Dynamically added HTML does not dynamically remove with JQuery in Cakephp

Hi, We have a part list in the "garagecar/view/index.ctp" view page. The part list is populated with PHP when the page is first loaded. Each part has a remove button. When the user clicks "remove", the controller link removes the part while the JQuery/Ajax removes the HTML that displays the part in the index: $html->link(__('remove', ...

Use javascript to generate a templatetag based on events after document ready?

I am working with the new version of django-threadedcomments and making some progress; it integrates nicely with django's commenting system, however, I'm stuck and not sure how to proceed. For threaded comments to work, the user needs to select a comment to "reply to" and then the correct submit form is brought up (with the appropriate ...

ASP.NET MVC Ajax: How to pass argument values to Ajax action from a select?

I would like to have filtering page that performs ajax requests to asynchronously update list of results. There are two comboboxes with option values and one Ajax.ActionLink. The list is rendered as a partial view inside a div. I know how to implement the controller part and also the interaction logic. What I am missing is how to pass ...

Content replacement from external website

So I am pretty new to jQuery and Javascript in Gen. I like the simple load() functionality that JQuery uses. My question: Is it possible to load content from an external website using the load() function? $(#placeholder).load("http://wwww.facebook.com/someuser"); tring to sync content on a specific facebook page that will be loaded i...