ajax

storing hidden ids and then submitting them with ajax, best practices?

I have a list of messages with element ids as "message"+id ( message1, message2 etc) when user makes ajax request from any particular message i want to access only the id. should i strip the id from the message id in jquery before submitting or do it on the server side? Or is there a simpler way to represent the id on the webpage for eac...

popup goes back to hidden state when clicking outside the popup area

If I have a popup (using a div), how can I have the div to go back to the hidden state when someone clicks anywhere outside of the div? i.e. the popup is visible, then someone clicks outside the popup, the div should be hidden again. How can I achieve this functionality? ...

Assigning random colors per session, for chat

I have an AJAX chat system that I'm working on and so far I have it working. One thing I want to do is have it so when the user name is displayed on screen, it is a unique color (like in an AIM window). How would I generate a random color to assign to the user's name for the particular session they are logged in for? The color would hav...

AJAX chat, auto scroll window

Duplicate Scrolling Overflowed DIVs with JavaScript I have an AJAX chat that outputs the messages to a div with overflow: auto so if it gets too long, the scroll bar comes up. Is there is a way to have it auto scroll to the bottom whenever a new message is added? Preferably using jQuery? ...

MVC - How to develop a wizard like control functionality in ajax.

Hi, I thought I would ask here about how to develop a wiazrd like control in ajax for MVC before I started it. The control will have pages that have data entry controls and on each page submission insert data into a database. Any ideas how to go about this? Malcolm ...

XML and multiple, non-unique DIVs

Is there a way that content can be pulled from an XML file into a DIV on click, without using IDs, and with multiple DIVs involved? For example, in the code below, clicking the first link would make content from an XML file appear only in the DIV below the link, and without manually assigning any IDs to the link or to the DIV. <a class...

What is the difference between Microsoft AJAX and AJAX Pro?

Hi all. What is the difference between Microsoft AJAx and AJAX Pro? Also, for what should I use AJAX Pro? ...

Show ajax loading indicator not immediately but after a delay

My current web app project makes heavy use of ajax calls. Most of them are fast and respond almost immediately. So, showing ajax loader all the time is not necessary. But I want to show an ajax loader when ajax calls take longer then 250ms (or so). Otherwise the users might be confused and keep clicking on links over and over again. :) ...

Jquery $.ajax async odd behaviour

I have a code snippet like this var searchurl="http://mysite.com/searchpath?q=test"; $.ajax({ type: "GET", url: searchurl, cache: false, dataType : "jsonp", async : false, success: function(data){ alert("success"); } }); alert("outside ajax"); The problem is that I am not seeing async at work. "outside aja...

First Ajax Page Ever Created

Hi, I am doing some research. Do any of you guys happen to know, What was the first Ajax page ever created and if its still online ? ...

How does reddit make the entire background go blackish when the login form pops up?

Hi, when you click on the reddit register button, a nice window pops up and the rest of the screen goes blackish. you can click on the rest of the screen to close the pop up. I know I could use the outermost div for this, but is that how reddit does it? are they changing the attributes of that outer div on the fly also? ...

JQuery Modal Popup after window.location

Below is the information required for this problem. default.aspx /test/default.aspx When default.aspx loads the user clicks a button which should then redirect to /test/default.aspx. I have the modal popup working just not with the redirect and ideas? I have tried doing window.location = "/test/default.aspx"; and using a custom settim...

Advice on playing sound files from an ASP.NET MVC app

I'm working on a new ASP.NET MVC / JQuery app which will need to play short sound files in response to user actions. For example, in some cases, when a user clicks on a word, the computer should pronounce that word (there is a small finite list of words). I'd like advice on the following: Which sound file format(s) would you recomme...

How may I best use the [Authorize] attribute with Ajax and Partial Views?

I was about to use [Authorize] on Actions that return partial views through Ajax; but I'm not getting the behavior I'd like (although its the behavior I expected). It seems like a long shot; but, is there any way to extend this attribute to "break out" of an AJAX call and redirect the entire page to the login screen? (As opposed to retu...

Showing spinner.gif in ajax call on loading time in grails

Hi I am developing a web application in grails which uses lot of ajax.I need to show a spinner.gif image while processing the ajax request.My sample gsp code is <div id="ajax-area"> <g:remoteLink action="list" controller="file" update="ajax-area"> view files </g:remoteLink> </div> In the above code if we click on the view fil...

Customizing an AJAX AutoCompleteExtender with a checkbox

I wanted to implement a multi-select AutoCompleteExtender that displays a checkbox on each row. I found some examples that implement checkboxes in dropdown lists, but nothing involving the AutoCompleteExtender. Any ideas? Thanks. ...

Trying to find an AJAX file upload solution for Zend Framework using jQuery...

I'm trying to create an "upload file, and email as an attachment" form where the file starts uploading after it has been selected (like Gmail), before sending the email. I would also like to implement a progress bar to show the status of the upload. There should be all sorts of examples out there, but I just can't find them! Do you kn...

Would hooking an AJAX function into a link work?

I have a site where I have a lot of outgoing links and I would like to count the clicks to those outgoing links. I need to keep the links need to be visible. (as in, no Digg like links or redirects). So I was thinking of hooking some jQuery function to all outgoing links. This function then calls a PHP script via AJAX that updates the ...

content from database as default for text area in html form

I would like to know the easiest way to extract the text from a database field and set it as the default text for a text area. I am planning at the moment to assiign the field to a variable, and then using javascript set it as the default text, but I am unsure of how to do this last part. ...

JSON WebMethod not working in Sitefinity

I am trying to call via ajax a WebMethod hosted in a traditional ASP.Net WebForm code-behind page. Here is the code for the WebMethod: [WebMethod] public static object States() { StateProvince[] states = new StateProvince[] { }; ApplicationServiceClient proxy = null; try { proxy = new ApplicationServiceClient()...