ajax

jQuery: Automatically abort AjaxRequests on Page Unload?

Hi All, Thanks for reading. I've noticed that if I have a page that has one or more ajax requests open, and I click a link to leave a page, or refresh it, it will wait for the ajax requests to complete before unloading. This isn't usually an issue, but if the request takes a while, it can be. I'm looking for something like: $(window...

Making a 2-player web-based textual game

I'm making a simple web-based, turn-based game and am trying to determine what modules exist out there to help me on this task. Here's the web app I'm looking to build: User visits the homepage, clicks on a "play game" link This takes the user to a "game room" where he either joins someone else who has been waiting for a partner to p...

ASP.Net AJAX TabControl

Hi. I have placed an AJAX Tabcontrol on my page. Inside the TabControl, I also placed a gridview. <cc1:TabContainer id="tabconLandTransPlan" runat="server" Height="300px" ActiveTabIndex="0" AutoPostBack="True"> <cc1:TabPanel runat="server" ID="tabMasterPlan" HeaderText="Master Plan" > <HeaderTemplate> <span style="font-size: 8pt; ...

AJAX pattern in Rails for submitting small chunks of data

I have a web page with lots of small images on it. In a typical scenario user clicks on image and expects it to change with a new image. Requirements: When user clicks on image, it should be immediately known to a controller in an Ajax way. Some strings should be passed to a controller when user clicks on image. Controller does its...

How can I clear HTTP headers for AJAX GET calls?

I have developed a solution that relies on an AJAX call to retrieve information and update the client page every 10 seconds. This is working fine, but I am concerned at the scalability of the code, given the number and length of headers being passed from client to server and back again. I have removed a number of redundant headers on the...

How can I apply jQuery statements to elements that are loaded in runtime?

I have a web page with one button and one div If you click this button that will load another button into the div using jQuery I found that the new button -which is loaded in runtime - will not be effected by other jQuery statements. how can I apply jQuery statements to elements that are loaded in runtime? I wish It is clear! if not ...

Usage of observer pattern with EJB and AJAX

Hi, I want to build an Ajax gui, that is notified on any state changes happening in my ejb application. To achieve this, I thought I build an stateful ejb (3.0) that implements the Observable interface to which the Ajax client is added as an observer. First, is this possible with Ajax. If yes, is this a good design idea or is there a m...

Sending login information via AJAX

Im using jQuery validate plugin and every form has multiple validation levels. level is by validate plugin level is: data is submitted to site I get a reply if everything is ok -> JS redirects to url if there is an error, it shows warnings Now I wonder, is it safe to send login info via ajax? I know that with addons like firebug,...

How to display a message on screen without refreshing like SO does?

The best example of this is through SO. You can be viewing a question, and without refreshing the page you will get an orange message at the top of the screen letting you know you got a badge and check your profile. This all happens without refreshing the page. I am curious how you go about doing that? I am going to guess something wit...

How do you serve a file without leaving the page?

Aims I'm trying to let users download a file (myfile.zip in this case) by clicking a button on the page, without them leaving the page - ie the browser must stay on the current page, and leave them in a position where they can continue to use the page, including clicking the button again (should they wish to get a new copy of the file)...

jQuery need to set variable's value from the value of a form input box

I am looking to grab the value of a form input. I think my problem is on this line: var vid = $(this).next(".pid").val(); I need to send the value of the input box named 'pid' to a php page, however there are several forms on the page, all with input boxes named 'pid'. When i merely have: next(".pid").val(); the value that is ...

hi i need to erase a certain session variable from javascript

hi i need to erase a certain session variable from a javascript function how can i do this can anybody help me? ...

postback makes textbox cursor to hang

I'm trying to do a search that you type in some letters and it returns list of results and you can type more for accuracy. The next code is in modalpopupextender. <asp:UpdatePanel runat="server" ID="upnlPatientSearchModal" > <ContentTemplate> <div class="popupheader" align="left" width="300"> <asp:TextBox ID="txtFiel...

javascript not being called

Hello, I have the following javascript functions, which when in a standalone file, will be called correctly from a page. function deleteItem(layer, url) { var xmlHttp=GetXmlHttpObject(); if(xmlHttp==null) { alert("Your browser is not supported?"); } xmlHttp.onreadystatechange = function() { if(xmlHttp.readyStat...

element not being removed from DOM

I have code to delete a record from mysql, displayed in a table via php, and subsequently delete the table row from the page. The record is deleted, however nothing changes in the page or the DOM, and it should change instantly. Here is the javascript code to delete from the DOM function deleteItem(layer, url) { var xmlHttp=GetXmlH...

How to get Ajax response from MSHTML??

Hello, Does anyone have any ideas about how to intercept an ajax response to a textbox on the browser page? The text box is an autosuggest ajax control and I'm sending keystrokes to it and trying to see if what comes back to the textbox's dropdown is correct. Using c#. Haven't found anything related to this online so far. Thanks! ...

two ajax functions in one page?

Hey I am trying to run two ajax functions in the same page One sends the value put into username the other sends the value put into email, which sends to ajax.php & ajax1.php below is my code: <script type="text/javascript"> function AjaxFunction(username) { var httpxml; try { // Firefox, Opera 8.0+, Safari httpxml=new XMLHttpRequest(...

Debugging Ajax code with Firebug

I've a couple of problems debugging code returned in an Ajax call - specifically, a function returned in json (errors don't get trapped in Firefox) - up to the point where I started debugging these problems in Internet Explorer (I think it's a firefox related problem, as Venkman doesn't detects those errors either) Do you know of any way...

.NET Winform AJAX Login Services

I am working on a Windows Form that connects to a ASP.NET membership database and I am trying to use the AJAX Login Service. No matter what I do I keep on getting 404 errors on the Authentication_JSON_AppService.axd call. Web Config Below <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the ...

Resuable Asp.net server control with Quirks and Standards mode.

Hi, I am developing a reusable ASP.net server control that needs to work in IE 6+, FF 2+ and Safari both Quirks and Standards mode. The control will expose two user definable properties height and width both of these attributes can be defined as either a percentage or as a pixel value. Inside the control I have two column Divs that c...