ajax

Deleting blog post using Blogger API, Javascript and Prototype

Hello, everyone! I'm trying to delete a blog post on blogger.com using Blogger API via Prototype Javascript library. Here's my code: var request = new Ajax.Request( 'http://www.blogger.com/feeds/'+remoteBlogId+'/posts/default/'+postId { method:'DELETE', requestHeaders:['Authorization', 'GoogleLogin auth='+authKe...

ASP.NET MVC Ajax OnBegin/Complete Javascript Problem

Hello, I am trying to fire off a javascript method using the OnBegin AjaxOption in an Ajax method. However, when debugging with firebug the callback in unable to find the Javascript method and I do not know why. My code is simple, first I use a basic Ajax method like this: <%= Ajax.ActionLink("Testing", "Testing", new AjaxOptions ...

Need help with cycle in JS

I have such function, that adds a grid of droppables: function AddClassroomDrops(grid, weeks, days, times) { for(week = 1; week <= weeks; week++) { for (day = 1; day <= days; day++) { for (time = 1; time <= times; time++ ) { Droppables.add('container_grid'+ grid + '_week' + week + '_day' + day + '...

How to control Dojo FilteringSelect default rendering!?

Hi, I have a dojo dijit.filering.select that populates with values from a dojo.data.ItemFileReadStore. Everything is working fine except I would like the filtering select to automatically get populated with the first value in the itemFileReadStore. Currently it is loading them as a list of options that are revealed when you click the do...

Sending html data via $post fails

I am using the code below which is fine but when I use the code below that in an attempt to send an html fragment to a processing page to save it as a file but I get nothing. I have tried using ajax with processData set to false ads dataTypes of html, text and xml but nothing works. I can't find anything on this so I guess I must be mis...

How to show server errors in Rails 2.3.5 with JSON and jQuery

I've got in-place editing on a page in my app (using Rails 2.3.5 and jQuery). I want to know how to display an error on the page when the update fails. I'm using ajax (an XMLHttpRequest) to save an update to a Comment object. The controller has an update method like this: def update @comment = Comment.find(params[:id]) respond_to d...

How do I reset a form in an ajax callback?

I am sending a form using simple ajax and returning the results in a div above the form. The problem is that after the form is submitted and validated, I display a thank you and want to reset the form so they don't just press the submit button again... Can't seem to find the right code to do this... <form id="myForm" target="sendemail...

Ruby on Rails, XML, AJAX, Perl Good Interview Questions

I am trying to devise a set of 15 to 25 questions to ask some of the people applying at our company. Can you guys throw in some good questions about Ruby, XML, Ajax, or Perl? This is for Junior position. I want just some easy questions, but at the same time they can be a little challenging. You know small answers, but requiring good k...

valid json still fails on IE with jquery's ajax or getJSON callbacks

everytime my page loads, im supposed to create a datatable (also a jquery plugin) but when im fetching the contents, using .ajax or .getJSON always goes straight ahead to the error function, without even telling me what went wrong inside the callback $.ajax({ cache: false, type: "POST", url: oSettings.sAjaxSource, data: ...

Multiple ajax calls for included js files inside jsp fragment

I am including a jsp fragment by making an ajax call. Now this jsp frag happened to include several js files. When the ajax request is completed, it is loading each of the included js files (on fragments) using a separate get request. (I checked this using firebug.) Now is this the correct behavior (making separate get calls) or am I m...

Connect sortable lists together and update SQL using jQuery UI

I'm using jQuery UI's sortable lists to sort items in a todo list, and the reordering of the lists works like a charm. I have several UL lists for each todo category, i.e. Design, Development, etc. I want to be able to move an item from one category to another, and jQuery UI's sortable lists plugin allows me to do this with the connect...

Ajax in existing asp .net project.

hi , I have a web page devoloped in visual studio 2008. I have 4 dropdowns and a repeater in the page.based on the selection(search criteria) from the dropdowns the repeater value will change. and one dropdown selection will bind values to the other dropdown also. Since the page is causing a lot of postback we decided to implement aj...

Binding HttpPostedFileBase using Ajax.BeginForm

Hi, I have a form which binds a model and a file upload using the default binder for HttpPostedFileBase. This works fine when using Html.BeginForm(). However, I wanted to perform the same action using AJAX so I replaced this with Ajax.BeginForm() changing the parameters accordingly. The model still binds correctly, however I can't get...

How do I post long strings that contain special characters (like '&' specifically) via an AJAX request?

I'm looking to make a Contact/Query form, wherein the end user can send an email to the webmaster. The form has a 'textarea' field, which captures long strings from the user, if I use AJAX to submit the form using GET method, my params tend to break if their is a special character, specifically '&' in the textarea's string.. I'm stuck p...

Jquery - intercept links created by ajax request

I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() { $("a").click(function() { //do something here }); }); My problem is there are certain parts of the page that have not finished loading on document ready. They are populated via ajax calls. The links in these...

Download estimator using JavaScript and Ajax

I would like to implement the download estimator using the JavaScript and the Ajax. I have gone trough Google, existing posts on stackoverflow also to find the existing implementations for the download estimator and i found most of the time asking user bandwidth and then calculating the number is strategy. It good approach and there is...

Encoding issues with Microsoft Word characters in an AJAX request

Hi all, I'm writing a function to convert MS Word-styled text into Adobe InDesign-formatted text (it uses a kind of XML to indicate styling). The text is pasted into a TinyMCE rich text editor, which then sends the HTML-formatted code to a php function. I've tried this function to clean up the code once it reaches my conversion code: ...

jquery ajax type GET question

Hi all! I hava a simple question. I have a server running which take actions according to parameters in the url. Example: if I type in browser: http://localhost:8081/Edit?action=renameModule&amp;newName=Module2 This works correctly. I would like to know the equivalent jquery ajax method to perform the same thing I have tried $.ajax...

jquery Ajax call resulting in Undefined Error in Firefox

Hi I've been pulling my hair out for the last few hours with this problem. And the googling has been hampered by the very vagueness of this. So let me apologise for that first. Basically I'm using jquery and ajax (with C#) to return data from the backend and display that to the screen. The code works perfectly for firefox and IE. But w...

Javascript timer that restarts on key up?

O, so i have a 'live search' ajax search, which currently runs an sql search (via ajax) on each key up. What i would prefer is to: run an sql search after a key has not been pressed for say 800 milliseconds . So i want to have a timer that is started on key up, if the timer reaches 800ms then the ajax is called, if a new keyup event...