ajax

Problem with OO programming in javascript and ASP.NET AJAX

Hi, I'm trying to keep as much OO as possible, but ASP.NET AJAX seems to be doing something strange after returning from the server... function Person( personId ) { var id = personId; var firstName; var lastName; this.initializeStep1 = function() { PeopleServices.getFirstName(id, this.initializeStep2); } this.initializeStep2 = fu...

How to retrieve the value of a text area in javascript

I have a form with a text area input. I'm using JQuery to submit the form via an AJAX request in order to update a database. My problem is that I'm having difficulty retrieving the data from the text area input. If the input has an id of "txtBody" I have tried: var body = $("#txtBody").val(); // This adds 'undefined' to the database v...

What is the simplest way to implement "server push"-like behavior for a web page?

I'm attempting to make a very simple 2-person chatroom for my Django site. I'm learning AJAX to do this. I need parts of the web page to update without user interaction: When User 1 sends a message, it should appear on User 2's screen When User 1 logs off, his status should change to "offline" on User 2's screen What is the simplest ...

RA-AJAX download anywhere?

Hi there, I realise the RA-AJAX team have some legal stuff going on right now.. although I was eager to try their 1.0 version of the RA-AJAX library... I'm not sure if I am allowed/can access the library from somewhere else (i.e. another download site etc) or if it is totally banned at this time?? I know it was meant to be open source....

How do I make Ajax.ActionLink update an element instead of navigating the whole page?

I am trying to update a <div> in my view when the user clicks on an Ajax.ActionLink. However, it always navigates the entire page rather than inserting the server's response into the element I specify. I feel like I'm doing everything in this example, but even after creating the simplest test case I still can't create the behavior I wa...

What data formats can AJAX transfer?

I'm new to AJAX, but as an overview I'd like to know what formats you can upload and download. Is it limited to JSON or XML or can you even send binary types like MP3 or UTF-8 HTML. And finally, do you have full control over the data, byte for byte in something like a byte array, or is only a string sent/received. ...

Asp.net Ajax , Hangs Somtimes

Hi, I use ASP.net Ajax on my project. and using Session for state management. in some piece of code , I have some modalpop up , that contain UCs and do some things. If I use UpdatePanel , sometimes, when I open popup, for a long time progress bar shows and dont do any things. if I refresh page it will work correctly. Also If I remove t...

How do I alter request parameters before posting XHR action in Ruby On Rails?

I have a form with a list of people with check boxes next to them. Then I have a submit_to_remote which will pass the checked people into the controller for processing. It currently passes checked people in the form: checkbox_name => checkbox_value where checkbox_value is the person_id. This comes from prototype using parameters:For...

Getting json on Ajax response callback

Hey! I am trying to create a little ajax chat system (just for the heck of it) and I am using prototype.js to handle the ajax part. One thing I have read in the help is that if you return json data, the callback function will fill that json data in the second parameter. So in my php file that gets called I have: header('Content-type...

onselect in one combo it changes data dynamically in other combo?

Hello sir I am new to the jsp and ajax world. my problem is If i select one combo option then it should change the other combo options dynamically without submit button press. for example if i select the country then it should shows their states in other combo. I am using servlet & JSP and MS-ACCESS as backend. please reply as soon ...

How to make two jquery-ajax process at the same time?

I trying to call 2 functions in the same page to submit jquery-ajax at the same time to process difference task (function 1 is to instert new records into the database, function 2 is to read the database every 5 sec then display the records from the database on the table in html). Before I call to function 1, the page working fine with...

prototype.js Ajax.PeriodicalUpdater call own function to update

Hey! Anyone know if it is possible to make the PeriodicalUpdater pass the data it received to a function I assign to update the desired field? I want to process the data I receive and then have the PeriodicalUpdater function update the field. ...

linking to options drop down

I don't know if this is possible so bare with me on this one. Can you link to a specific value in an options drop down box from another page? In other words, let's say that I'm on page 1 and I want to anchor link to page 2 that has an options drop down box with 3 different values in it. Let say by default when you go to page 2, the drop ...

JavaScript and jQuery scrolling issue in all browsers

Hi, I just launched http://tweetmp.org.au/ with a stack of new features, including the MP Spotlight you can see on the Homepage Every few seconds, the following code is run, // get the next it var nextId = ids[Math.floor(Math.random() * ids.length)]; $.get('/GetSummary?id=' + nextId, function(result) { if (result) { ...

How to get a method to detect 'remote_form_for' usage?

New to Rails... here goes: If I want my 'create' method to respond differently to an AJAX request than to a normal POST request, can I have the method detect which was used? Or, is it better to use different methods for AJAX and non-AJAX requests? Thanks for your input. ...

ASP.NET 2.0 JQuery AJAX Login

I'm trying to figure out how to implement an AJAX login for a ASP.NET 2.0 site with Jquery. I already have a implemented other simple Jquery AJAX application on the site, but I'm unsure how to convert over the standard login control to POST via AJAX. Should I expose the login.aspx page methods? Any help would be great. ...

can i post a temporary file name of the file that is being uploaded using jquery

hi , i need to post a form which includes personal details and i need to upload a attachment file also and i need to achieve this using ajax , how can i upload a file using ajax , i need to post the personal detail as well as upload a file at the same time using ajax , how can i do this? ...

How do I go about getting the Ajax Queue plugin working in jQuery 1.3?

I have an app that sends multiple Ajax requests simultaneously. I was originally running into race conditions until I discovered the jQuery Ajax Queue plugin, which works great with jQuery 1.2, but fails with jQuery 1.3. There are actually two different versions of the plugin; I am currently using this one which is the same as the first ...

$.ajax() methods data

Hi, I m having some div tags which onchange i want to insert the new value into my database.. As people suggests , i m using $.ajax POST to insert ..SInce i m new to JQuery and Ajax..I dono what actually that data and msg in $.ajax()..Please suggest me how to insert my value to database asynchronously....(on the Fly) ...

Modifying Liferay javascript functionality

I want some tags to be added to an article. The problem is that the tags are displayed in the pop-up window in "random" order. This is due to order they are pushed to the page. I want to intervene, sort the tags and present them ordered. How would you do that? I spotted the methods in tags_entries_selector.js, but I am not really sure wh...