ajax

Rails 3 - Category Filter Using Select - Load Partial Via Ajax

Hey. I am trying to filter Client Comments by using a select and rendering it in a partial. Right now the partial loads @client.comments. I have a Category model with a Categorizations join. This all works, just need to know how to get the select to call the filter action and load the partial with ajax. Thanks for you help. Categories c...

AJAX HTTP protocol response problem with custom server

I've started to add HTTP support to a custom C# non-webserver application which seems to work fine from Firefox/IE/Chrome when typing in the URL directly to the browser - where I can see a returned text string in the page from my application. The problem is when I try do the same from a HTTPRequest in JavaScript on a web page I don't ge...

I want to Know how can i pass the Value of Id which is in ViewData?Please see the below code?

<%#ViewData["id"] %> <h2>MarkerDetail</h2> <script language="javascript" type="text/javascript"> $(document).ready(function(){ $.ajax({ url:"/Marker/MarkerDetailPartial", data:"", success:function(result){ $("#ReplyDetails").html(result); }, error:fun...

I need to communicate between 2 pages without refreshing the page, with ajax, but it can only fire when a event is raised in the application on the serverside.

To clearify, I've tried solutions with updatepanel/scriptmanager but I do NOT want to use them. I want to make this jquery-ajax posts and nothing else. Lets assume this scenario. We have a global event as follows: public static class CustomGlobalEvents { public delegate void SpecialEventRaisedEventHandler(object sender, string type...

Problems trying to use Visual Studio 2010 and AJAX extensions

Why can I not add ScriptManager control or UpdatePanel to a page in Visual Studio 2010? The drag( or double click) just fails - it seems like there is an incompatibility somewhere? UPDATE: This is 'default' install of 2010 Ultimate on Windows7, create a web application, cannot drag ScriptManager or UpdatePanel to the designer. Typing t...

Ajax doesn't work with GridView on a sharepoint web part

Does anybody know the way how to make a GridView, placed inside a Sharepoint Web Part, to use Ajax? I placed a ScriptManager on a MasterPage, an UpdatePanel inside a web part. Every type of control works fine with ajax, except of GridView that forces to reload the entire page instead of updatepanel contents only. The resason for that, I...

passing text_field values in ajx on rails

I'm using <%= text_field 'person', 'one',:id => 'test', :onchange=>remote_function(:url=>{:action=>"update"}, :update=>"test") %> <div id="test"></div> Now I just want to send the value of text_field with :action i.e :url=>{:action=>"update(value_of_text_field_entered"} Don't want to use params[:person][:one]. Any suggestions?or ho...

Internet Explorer Error

The main error shown in IE is : ' Could not complete the operation due to error 80020101.' The error is displayed when the ExtJS framework tries to load a page containing a Ext grid component through an ajax request. It works without problems in Firefox and Chrome. Another error which is shown by IE is 'Expected identifier, string or n...

Google Ajax Search results differ from "normal" Google Results ?

Hi Folks, I guess anything important you might have to know is within the title. If I use the Google Ajax WebSearch API with, for instance, "Dummy Search" as phrase, my resultset is a different one than if I perform the same phrase over google.com. How can that be? My querystring paramter options are exactly the same, language etc. T...

jQuery $.ajax Not Working in IE8 but it works on FireFox & Chrome

I have the following ajax call which works perfectly in Firefox and Chrome but not IE: function getAJAXdates( startDate, numberOfNights, opts ) { var month = startDate.getMonth() + 1; var day = startDate.getDate(); var year = startDate.getFullYear(); var d = new Date(); var randNum = Math.f...

Exceptions thrown in jQuery AJAX callbacks swallowed?

Is there any way to handle exceptions thrown from AJAX callbacks in jQuery, other than adding a try..catch block to each callback? The error function is not called in this situation. $.ajax( { url: 'myurl.rails', success: function( data ) { throw 'Oh no!'; }, error: function ( xhr, textStatus, errorThrown ) ...

A quick question on data returned by jquery.ajax() call (EDITED)

EDIT: The original problem was due a stupid syntax mistake somewhere else, whicj I fixed. I have a new problem though, as described below I have the following jquery.ajax call: $.ajax({ type: 'GET', url: servicesUrl + "/" + ID + "/tasks", dataType: "xml", success : createTaskListTable }); The createTaskListTable funct...

Showing selected tabs differently with JQuery ajax tabs.

I had tabs with preloaded content like this: $(function () { $('div.tabs ul.tabNavigation a').click(function () { $('div.tabs ul.tabNavigation a').removeClass('selected'); $(this).addClass('selected'); return false; }).filter(':first').click(); }); This added class="selected" to links and css made sele...

jQuery AJAX form submission not working

I'm trying to submit a form through AJAX instead of using the normal POST submission. The HTML is just a standard form with method="post" and my jQuery code is as follows: jQuery.noConflict(); jQuery(document).ready( function($) { var $form = $('#default_contact'); $form.submit( function() { $.ajax({ type: '...

Loading javascripts in ajax callbacks

Hello, Situation: I send an ajax request that returns HTML containing elements needing event handlers to be set on them. The code that sets the handlers for these elements is contained in a separate javascript file. I have been using the following code to load the required js files on callback by scripting the <head> tag. I have no...

AJAX HTML PHP question

This is my scripts.js function showHint(str) { if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlh...

How would you pass objects with MVC and jQuery AJAX?

I am finally experimenting and trying to learn MVC after years of asp.net. I am used to using asp.net AJAX PageMethods where you can pass an object that automagically gets parsed to whatever type the parameter is in that method. Javascript: PageMethods.AddPerson({First:"John",Last:"Doe"}); Code-Behind: [WebMethod] public static Resu...

Asp.net MVC Ajax form that return Json to a javascript method.

Hello guys, I have an ajax form that saves a object in the database then return a Message like this: return Json(new {Message = "Message!"}, JsonRequestBehavior.AllowGet); We are ok here, but I don't know HOW I'll get this result in the view to display in a jQuery modal. My ajax form is like the following a...

bootstrapping AHAH without full page load

I've written some modal box functionality that loads HTML into the DOM as snippets. This includes AHAH-enabled forms. I've got as far as pulling out the AHAH settings, and can re-initialize: jQuery.extend( Drupal.settings, response.setting ); I can also re-initialize: Drupal.attachBehaviors( container ); I've even ensured that aha...

How to set different width for INPUT and DIV elements with Scriptaculous Ajax.Autocompleter?

Hello, I am working on autocompleter box based on Scriptaculous Ajax.Autocompleter. It works in general, but I need to have list of choices wider (see image -- green line -- 320px) then input box (see image -- red line -- 155px). My first try was to set various width with CSS classes (like above), but it didn't work -- list of choices...