ajax

How to append external content using ajax?

hello Please have a look <div class="item"> <div class="section"> <a href="/test.php?id=1" class="clickme">Click Item 1 </a> </div> </div> <div class="item"> <div class="section"> <a href="/test.php?id=2" class="clickme">Click Item 2 </a> </div> </div> <div class="item"> <div class="section"> ...

ASP.NET MVC how can I return an error from a file download action without leaving the current page?

I am calling a file download action from javascript: $elem.click(function() { window.location.href = 'MyController/MyFileDownloadAction'; }); The controller returns a file: [AcceptVerbs(HttpVerbs.Post)] public ActionResult MyFileDownloadAction() { /* do some processing, generate an in-memory file... */ return File(myFil...

Problem in refershing the outputpanel +jsf

Hi All, Ive a problem in refreshing the outputpanel entire page is getting refersed instead of panel. Here is my code <h:selectOneRadio id="radio1Id" value="#{bean.options}" valueChangeListener="#{bean.onChange}"> <f:selectItem itemLabel="Yes" itemValue="Yes" /> <f:selectItem itemLabel="No" itemValue="No" /> <a4j:support event...

Mootools - Adding exra form fields on an event

I am working a project currently in which the user can add multiple news headlines and news articles, the number they add is entirely up to the user, for this reason the form they first see only has room for 1 headline and 1 article, to add another article/headline there is a 'button' that has a click event on it, currently I have this i...

Drupal authcache - load dynamic content through ajax

I'm using Drupal 6 with authcache. I've read that you can load dynamic content by using ajax, even when the whole page is cached with authcache. In my template files, I've used this code to show Edit and Delete links: <?php if ($user->uid == $node->uid || in_array('moderator', array_values($user->roles))|| $user->uid == 1): ?> <span cla...

jQuery AJAX call to Java/Wicket server gets no response in IE (6/7/8)

Note: This relates to a previous question. I have a Wicket page that has a form with some complex client-side interactions that I decided to use jQuery for instead of Wicket (long discussion, I know). Essentially I'm just building a JSON object, submitting it via AJAX, and performing some action on completion. The call works fine in Fir...

problem in returning a json response to jquery ajaxupload plugin

hi, I am using jquery ajaxupload plugin to upload files .I have the following js on my default.aspx page $(document).ready(function() { /* Example 1 */ var button = $('#button1'), interval; new AjaxUpload(button, { action: 'upload.aspx', name: 'myfile', responseType:'json', ...

A reasonable number of simultaneous, asynchronous ajax requests

I'm wondering what the consensus is on how many simultaneous asynchronous ajax requests is generally allowable. The reason I ask, is I'm working on a personal web app. For the most part I keep my requests down to one. However there are a few situations where I send up to 4 requests simultaneously. This causes a bit of delay, as the ...

How to complete $.get() when a form is submitted using jQuery

I am using a third party shopping cart that sends a registration form to a .cgi script. I want to send information from that form to me, and the customer via a jQuery $.get() function call. The $.get calls a registration.mail.php script. The problem is that the form submitting seems to cancel out the ajax call before the ajax call can...

Ruby on Rails: how to set content expiration for 15 minutes if it is an AJAX request

Is the following a good form of detecting AJAX request and setting expiration for 15 minutes so that the same GET will not require any network traffic? # in controller if request.xhr? response.headers['Expires'] = (Time.now + 15.minutes).httpdate response.headers['Cache-Control'] = '' # override any no-cache, must-revalidate end ...

Fetching raw CSS file contents from a browser

Is there any way to fetch the raw contents of a CSS file? Lets imagine that I wanted to fetch any vendor-specific css properties from a CSS file. I would need to somehow grab the CSS contents and parse them accordingly. Or I could just use the DOM to access the rules of a CSS file. The problem is that in while using the DOM, mostly all...

Ajax Hover Question

I am brand new to AJAX but I feel AJAX is what I need to get this requirement finished. When the user hovers over a link, I need a box to show where they can input their email and name for a newsletter signup. Can someone kindly provide me with what this technique is called in AJAX so I can try to find some tutorials? Any help is greatly...

ASP.NET 3.0 and JSON from Web Services

Guys, I'm trying to hookup a ASMX web services in asp.net 3 to return JSON rather than XML. Anyone ever tried/wanted to do this? Thanks!! ...

MS UpdatePanels not really AJAX?

I keep hearing that the server side ASP .NET AJAX controls (like UpdatePanels) are not truly AJAX though they seem like it, because rendering is not completely on the client side. I'm trying to understand this with more clarity. Could someone elaborate? Thanks... ...

jQuery 'If' statement string comparison not working.

I'm having a very hard time trying to do something very simple. Here's the code: if(data == 'success') { alert('foo'); } else { alert(data); } I've simplified it, but that's all that's necessary to understand what's going on. the variable 'data' is a result of an AJAX call, if that m...

ASP.NET Button Inside Repeater Inside UpdatePanel Won't Fire!

Hi. ASP.NET 3.5 SP 1 / Visual Studio 2008 V 9.x RTM I am trying to get a button inside a repeater inside an updatepanel to fire. I't won't. I have tried adding a trigger outside the ContentTemplate and inside the UpdatePanel to no avail: <Triggers> <asp:AsyncPostBackTrigger ControlID="BtnAddStatus" EventName="Click" /> ...

Are there any Ajax/jQuery like library for Windows mobile application development?

Hi, I need to develop an ajax based interface for a web-page, and I am not able to find any library that can help me do it. I have tried jQtouch, and it doesn't seem to work for windows mobile. Also I have tried XUI Library (http://xuijs.com/), this also didn't work. Can anyone point me to the right direction? I don't like to do ajax ...

XT Ajax Framework Help

Hi, I have been playing with XT Ajax framework and tried to replicate this dwr dynamic text example: http://directwebremoting.org/dwr/examples/index.html (specifically the dynamic text tutorial) My question is this: How do I retrieve the value from the input text field in my Ajax Handler for further processing? Any help will be very muc...

A canvas object in jQuery, is it possible?

I intend to make a browser game with jQuery, I would need a canvas object in which I can place many visual elements and animate them to some extend. Is this entirely possible with just jQuery? Some may point to HTML5 canvas but it's specification isn't complete so I'm not too fond of it. ...

Using ajax to call a servlet

Hello As I understand it and have used it, AJAX is used to make requests from the client to the server and to then update a HTML DIV on the client with new content. However, I want to use AJAX from a client to a servlet to verify the existence of a URL. If the result is bad, I can set an error message in the servlet and return it to t...