ajax

Escaping HTML entities in the URL of a rails remote_function

Some content in my page is loaded dynamically with the use of this code : javascript_tag( remote_function( :update => agenda_dom_id, :url => agenda_items_url(options), :method => :get ) ) When it outputs in the browser, it comes out as this : new Ajax.Updater('agenda', 'http://localhost:3000/agenda_items?company=43841&history...

ASP.NET AJAX vs jQuery in ASP.NET MVC

Which one is better to use in ASP.NET MVC? ...

.Net\AJAX Listbox and updatepanel problem

I have a listbox(l1) in an updatePanel that gets populated on changing a drop-down which is in the updatepannel as well. I have another listbox(l2) in the updatepanel which can populate l1 via javascript. I have 2 two items in dropdown. Item 1 has 6 items releated to it and Item 2 has none. When the page loads Item 1 is selected in t...

Can I use Orbited as a HTTP server for dynamic content?

Comet Server Orbited can serve static files from paths specified in it's config file under [static] section. I wonder if it's possible to serve dynamic content via orbited? ...

jquery $.post get string returned from method

i have a simple form on my page with a textbox and button that calls this javascript method onclick="Create();" and this is the function that is ran... function Create() { var txt = document.getElementById("longTxt").value; if (txt == "Insert Name") { alert("You must provide a name"); return; } var d...

JQuery AJAX syntax

I am trying to find the correct syntax to pass a varible to my JQuery Post. var id = empid; $.ajax({ type: "POST", url: "../Webservices/EmployeeService.asmx/GetEmployeeOrders", data: "{empid: empid}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) { alert(resu...

What return types can be serialized by JQuery AJAX?

Hey all.. I have a call (POST) to a web service that returns a type IList<>. I suspect that this type is not serialized properly because I get the following error: "A circular reference was detected while serializing an object of type......" Can I only work with arrays? Make another method that returns only an array? I would rather not...

how to create a new AJAX object using Prototype

Hi All, How can i create a new Ajax object everytime for a particular ajax request, using Prototype library? It seems in Prototype, "Ajax" is a global object and all reqs are its instances. Please help.. Thanks ...

Can I use the AJAX Autocomplete extender *without* a webservice?

Using ASP.NET 3.5 with VB codebehind. I don't want to use a webservice to populate an autocomplete extender on a textbox. In this case, it's where the user is entering email addresses and I don't want to make a trip to the database every single time. I'd much rather keep a collection in session state and 'bind' the autocomplete to tha...

Ajax update pannel problem

I have a dropdown and 2 listboxs in a updated panel and a save button on the page. When the page loads I load one of the list boxes with data related to the selected dropdown item. When the user selects a different item in the drop down I do a postback and reload the listbox with data related to the selected item. When the user clicks...

IE not triggering jQuery Ajax success

Hello all, I'm working on a script to load some images async using jQuery. Here is a code snippet of the function that loads the images - try{ for(img in imgsArray){ $.ajax({ async: false, type: "get", url:imgsArray[img], success:function(imgFile){ alert("success"); //do something useful }, error:function(XMLHttp...

Why do CSS styles only take affect when placed in a style tag in my form and not in the associated CSS file?

Thanks to [this question][1] about repositioning the AJAX toolkit's CalloutExtender control, for an answer to my problem of positioning Validator CallOuts on a web form. Can someone tell me why adding the CSS classes directly to my web page within a <style> element has the desired effect but when adding the same classes to a linked CSS ...

Retreiving data using WebRequest

Having nicked some code from msdn I'm miffed that it doesn't work exactly as I want straight away. I'm trying to use google translate to, well, translate some stuff for me on the fly. The problem is that t5he responseFromServer doesn't contain the translated text, nor does the source when I look at it using a browser although when lookin...

Problems with layout of css page in ajax application

I have a css style, which when applied to a static html page works fine. The problem is, that content is dynamically loaded, into layer3, and then into layer 2. I don't really understand the consistency. Sometimes the layers are far apart, sometimes they are meshed over each other. Why is this happening, and how can I keep layer3 in a...

Calling a ScriptMethod on form submission?

When I call a ScriptMethod from an ASP.NET button using the OnClientClick property, the ScriptMethod returns 95% of the time (alert box shows), and the page submits. If I call the method from a HTML input button, the ScriptMethod returns 100% of the time, but of course the page doesn't submit. If I change the type to submit, I'm back to...

jQuery validation not working in Thickbox display ajax call

Hello All, Im using Thickbox 3.1 with jQuery 1.3.2 with the Validation plugin and all works great when I run the pages individually but when I use Thickbox the page popup (As it should) but the validation on the page now doesn't work (Inside the Thickbox), any help on this would be great. BTW the strange thing is that Thickbox looks to...

Is there a XDomainRequest equivalent in Firefox?

Is there an equivalent to Internet Explorer's XDomainRequest in Firefox or any of the other browsers? I'd like to access a service/website outside of my domain. ...

Why is jQuery Ajax so slow on IE7?

I am having a problem with jQuery AJAX calls on IE7. This simple code works fine on FF and Opera. But on IE7 it takes 3-5sec. - that's 20 times slower than FF! Loading content is pure HTML and inline JavaScript code. No JS rendering. I even turned of the inline JavaScript code. Bu still slow. $('#block').load('some url'); How to ov...

ASP.NET MVC Ajax.BeginForm eats params of submit button clicked. Looks like bug.

If you are using Ajax.BeginForm() with multiple submit buttons similar to this: // View.aspx <% using (Ajax.BeginForm("Action", "Controller", new AjaxOptions { UpdateTargetId = "MyControl", })) { %> <span id="MyControl"> <% Html.RenderPartial("MyControl"); %> </span> <% } %> //MyControl.ascx <%@ Control Lang...

How can I intercept a link with jQuery when using a ajax call?

I might be doing something stupid. But if I have a normal link like: <div id="changeMe"></div> <a href="/Not/Intercepted" id="interceptMe">A link</a> and I attach a jQuery click event to the link like so: $('#interceptMe').click(function() { $('#changeMe').text('Changed'); return false; }); Everything works peachy. The page d...