ajax

Alternatives to DWR (www.directwebremoting.org)

I've been a big of DWR (www.directwebremoting.org) in the past and have used it on a few projects. It makes AJAX easy by creating javascript proxy / stubs to java classes on the server. While DWR has been around for years it seems to have slowed down ever since the main developer moved on - it's also quite large compared to it's early d...

setTimeOut() is not working with AJAX

In my application i want to send something to the server after some time. I have implemented it using AJAX. But it works for the first time but not doing it recursively. I have used setTimeOut() for doing that. var xmlHttp; var requestURL = 'http://localhost:1092/ClassicAJAXDemo/UpdateHeartbeat.aspx?name='; function show_da...

Microsoft JScript runtime error: 'Sys.Mvc.AsyncHyperlink' is null or not an object

Hi I'm working on an asp.net ajax mvc application I used Ajax.ActionLink method to add a link for updating span context using ajax, here is some part of my code : ... <span id="status">No Status</span> <%=Ajax.ActionLink("Update Status", "GetStatus", new AjaxOptions { UpdateTargetId = "status" })%> ... but when I run application & c...

Is there a way of making normal links automatically load through ajax, rather than normally?

I haven't explained this well. But what i mean is, if I have an ajax script that loads the content of a page in a DIV element, through the function 'loadpage('whatever.php');, instead of going around manually doing this to all links, is there a way of having a script that automatically makes all regular links load through that ajax func...

Updatepanel issue, client side event not firing

Hi all, I have an within which I have a LinkButton, and I am trying to handle its client side click event before its partial postback event occurs. I am using jquery for this, and its click event is not firing at all. The code works fine without updatepanel, but fails with it. <asp:UpdatePanel ID="ContinueTestPanel" runat="server"> ...

Any open source Ajax Scheduler for jquery/asp.net?

Is there any open source Ajax Scheduler (with week and month view) for jquery or asp.net? Thanks. ...

Can't get $.ajax or $.get to work...

I have this $.ajax (using jquery) code, it originally was the $.get that is now commented but for some reason I'm always getting the error and I can't find anything wrong with it =/, am I overlooking something? $.fn.randomContent = function(options){ var contentArray = new Array(); var dType = "html"; var defaults = { x...

Convert Curl retrieved HTML string to JSON with PHP, serve with AJAX

Hi, I am building a scraper with Javascript (AJAX; Prototype) and PHP (Curl). The url is served trough AJAX to the PHP/Curl. The response is a huge HTML string. I would like to send the string in JSON to Javascript so I can process it. If I send the raw responseText it works just fine, the html (string) get's rendered on my screen. Ho...

What's the difference between load(fn) and ready(fn)

... in the context of one element I need to check? I never faced the problem of uploading using iframe without jQuery, but now I think about uploading from ajax callback which contains a form, an iframe: <form enctype="multipart/form-data" action="get.imageupload.php" id="upload_form" method="post"> <input name="userfile" type="fil...

Django Dropdown Auto submit

Hee guys. I have a form with a dropdown for all companies. Now i want to display all the people that work for that company when the user changes the value in the company dropdown box without hitting the submit button on the form. Anybody have a good example for that? tks ...

Need help with associative arrays

Hi guys. My brain is fried after 10 hours of coding, so I need some help. I have used the following function to retrieve data from a form submission (before I process the data, verifying input etc): // All form fields are identified by '[id]_[name]', where 'id' is the // identifier of the form type. Eg. brand, store etc. // The...

jQuery AJAX call undefined error with special characters

Hi, I tried to make an AJAX call using jQuery, the data has special characters, e.g {'data':'<p>test</p>'}. It seems failed to pass this data in the first place. It will work if i just pass {'data':'test'}. encodeURIComponent and JSON.stringify failed here due to the special character < > /. Could anyone please help with it? Thanks. $...

Has anyone ever successfully tracked down uncaught exception during ajax request?

How do ajax know whether it failed or succeeded if server side doesn't echo anything back? $.ajax(error:..,success:..) I met with this exception in my test: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]" nsresult: "0x80040111 (NS_ERR...

What not to forget?

I'm currently working on an ajax-based application using PHP on the server-side and javascript(jQuery) on the client-side. I want to make sure my application is as secure as possible and need to know what things are absolutely necessary to do before launch of such application. What to check and what are the most vulnerable areas? I'm not...

Access to XMLHttpRequest.statusText will cause exception when it fails?

$.ajax(error:function(XMLHttpRequest, textStatus, errorThrown) { XMLHttpRequest.statusText }) Did someone also met this problem? EDIT I'm using Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.2) Gecko/2008091620 Firefox/3.0.2 ...

How to keep database connect alive?

I'm using ajax, and quite often if not all the time, the first request is timed out. In fact, if I delay for several minutes before making a new request, I always have this issue. But the subsequent requests are all OK. So I'm guessing that the first time used a database connect that is dead. I'm using MySQL. Any good solution? ...

Detect when AJAX changes HTML in a DIV in WebBrowser

Hello, After I load a page through a WebBrowser, and I click a link that fires an AJAX script, I need to detect when the AJAX java script finishes loading HTML changes into a div. Since no DocumentCompleted event is fired when the AJAX script is run, I don't know when it finish running. Is there a way I can attach an event to be raised ...

Ajax Links and jquery

Going with the just jquery it joke i was wondering in my website i have a link that says "Add". After clicking it the page refreshes and it says remove. I figure this would be better with ajax and not require the page to reload. How do i do this with jquery (should i do it in jquery?) and how do i know when the server receives the add so...

Memory leak involving jQuery Ajax requests

I have a webpage that's leaking memory in both IE8 and Firefox; the memory usage displayed in the Windows Process Explorer just keeps growing over time. The following page requests the "unplanned.json" url, which is a static file that never changes (though I do set my Cache-control HTTP header to no-cache to make sure that the Ajax requ...

Jquery Dialog - extra dialog opening

I have a dialog opening after a form is submitted using the ajaxForm plugin. The ajaxForm updates the dialog content. The problem is that an extra dialog is opening. Here's the javascript code: function formSubmit(target, form, success){ var formoptions = { target: target, success: success }; $(form).ajaxForm(...