ajax

Viable selectbox alternatives to replace huge lists of items?

I'm wondering if there are any viable interface alternatives to using select boxes where there exists very large lists of data (1000+). For example, in my application, I have a form that shows the details for a single inventory item (it's a pretty basic inventory management application). When an inventory is shipped out, warehouse staff...

XMLHttpRequest POST stuck at readyState 1 after several successive requests against IIS7+Windows 7 Pro

I'm using JavaScript to send textarea updates back to a server in real-time. My HTML page uses a single XMLHttpRequest object to POST data to the server asynchronously. The messages are sent potentially at every onKeyUp event, but because I only use a single XMLHttpRequest object I throttle the requests by only POSTing when the readySt...

How can I set the contentType of a jQuery ajax post so that ASP.NET MVC can read it?

I have some jQuery that looks like this: $.ajax({ type: "POST", url: "/Customer/CancelSubscription/<%= Model.Customer.Id %>", contentType: "application/json", success: refreshTransactions, error: function(xhr, ajaxOptions, thrownError) { alert("Failed to cancel subscription! Message:" + xhr.statusText);...

Change language/culture in Ajax enabled ASP.NET web application

I've implemented an ASP.NET web application that supports 5 different languages. The web application has 5 .resx files that contain the resources required in order to display the website in the languages it supports. To display the site in the language that the user has selected, I've been setting the Thread.CurrentThread.CurrentUICult...

setInterval stops after Ajax request

I'm using Asp.net MVC and I want my partial view to refresh on an interval, which it does until I make an unrelated Ajax request, then it stops. Here are a few simplified snips to illustrate the problem. in AjaxRefresh.js: function ajaxRefresh() { var f = $("#AjaxForm"); $("#AjaxLoading").show(); $.post(f.attr("action"), f...

When loading an html page via ajax, will script tags be loaded?

When you load an html document using AJAX, what does it do with the nodes inside the HEAD tag: (script,link,style,meta,title) ignore them or load and parse them? And in the case of jquery 's ajax() function? ...

Asp.net Mvc Ajax Json (post Array)

javascript\jQuery: > var items = new Array(); > > var obj { Begin: "444", End: "end" }; > > items.push(obj); items.push(obj); > > var request = { > DateStart: $("#DateStart").val(), > mass: items > }; > > > $.post("/Home/Index", request, null, > "json"); C# Mvc Index Controller public class My...

Close a jQuery UI Dialog from an element inside of it?

Here's a quick question that's probably simpler than I'm thinking. I'm populating a jQuery UI dialog with the resulting html from an $.ajax() call. In certain cases that html includes a button that when clicked, I want to close the containing dialog. Assuming that I don't know anything about the element that was specified to be the ...

Asp.Net Mvc - Switch from Server to Ajax

Is there a clean way to manage my Asp.Net Mvc Web site to both work correctly if javascript is enabled/disabled. Because, for now, I have to do hack like that to make both work. I think that doesn't make code that is easy maintainable and reusable... if (Request.IsAjaxRequest()) { return PartialView("SignUpF...

Callback for form submission (with jQuery)

I have a modal window that presents a form to users. The form includes one or more file uploads as well. Therefore I cannot submit the form with ajax. At the moment I'm doing a standard submit with a submit button. When the form is submitted (which takes a few seconds in general), a PDF is generated and sent back for download (i.e. the...

Rails: basic Ajax question! - I'm looking for example code about simple adding and editing for list.

I've created simple rails page using 'ruby script/generate scaffold subject name:string desc:string' command. Now, I can add, edit and delete subject in RESTful way. What I' like to do is changing above behavior as Ajax way. Everything can be done in index page. For example...this is the page throw the browser~ screen 1 Listing subje...

Populating dropdown menu with JSON Data

Hi Guys, Im tyring to use AJAX to populate a dropdown box based on the selection of another dropdown. I followed a tutorial using jQuery located here - http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/ and have altered the select box ID names in the select box names in the script. When a chagne the value o...

More Ajax / MVC problems

This is a fairly recurring theme on StackOverflow, but once again I can't get my MVC controller action to recognise the data I'm trying to send. Any suggestions gratefully received. My controller action looks like this: [Authorize] [HttpPost] public JsonResult Record(int task, string notes, double hours) ...

Ajax is "Getting" not "Posting"

I am trying to use the Post Method in my jquery code but it using the Get method for some reason. I am working under the Wordpress Framework which have renamed the "$" function to jquery, which I then renamed to $j. Can anyone help me with this simple function? $j.ajax({ method: "POST", url: "extension/marker.php", data: "series=test"...

Cannot catch an error on assync postback (asp.net page with updatepanel)

I use an updatepanel and I register a handler for endRequest to catch errors: Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); On the server an exception is thrown to test the client side. The problem is that in IE and FireFox EndRequestHandler is never called! It works as expected in Opera and Safari....

How to use Server.Transfer or Response.Redirect from ajax UpdatePanel?

How to use Server.Transfer or Response.Redirect from ajax UpdatePanel? ...

Manipulating HTML snippet after jQuery load

I am working on loading a HTML table snippet into a page via jQuery Load. When this snippet is loaded into the page will i be able to manipulate the table with jQuery or is it just treated as a string? When i say manipulate i have onClick events on table columns that need to fire. ...

Using Sinatra and ruby to interface to HTML buttons

Disclosure: I know nothing about web programming Background to problem: I have an environmental testing chamber testing embedded computers at various temperatures. It is controlled by a windows application. I can control the chamber via ruby and the Win32API interface of the control application. The chamber is far from my office and I w...

How to hide links on browser's statusbar when you mouseover on links on webpage?

I am using Zend, PHP, AJAX, JQuery in my projects. Question is that how can I force to not display a link on browser's statusbar when I mouseover on a link on my webpage. Best example is on this site, when you mouseover the up-vote link on this site, it does not show the link and after click the votes increased without refreshing the pa...

Generate Forms, best practice

Hi, I would like to know if there is any library around I could use to generate forms and maintain them without too much pain. I'm working on an app with hundreds of form, and we have been re-inventing the wheel for all of them so far. It's not really DRY and I have to test them all. I know that some framework can manage forms quite we...