ajax

xmlHttpRequest abort() method does not close the connection in Internet Explorer

I have multiple xmlHttpRequests on my page, and I am attempting to call the abort method on them all. Works great in FF. IE, on the other hand does not do a darn thing. The connections do not close, and I am unable to navigate to another page until the requests complete. What is this? Why doesn't IE close the connections when abort() is ...

How do you unit test your ASP.Net MVC JsonResult actions?

I'm still figuring out a few of the finer points around unit testing my ASP.Net MVC2 application using NUnit. On the whole, testing my ActionResults, models, respositories and the like is straight-forward, but I've not had to test Ajax methods before and I'd like some guidance on how I should best go about it. Thanks in advance. ...

Specifying class name instead of id in Ajax on Rails

Hi friends, I need to know, how to fetch class name from div instead of id when using Ajax on Rails my coding is like below, <div id="test_test1" class="test"> </div> <div id="test_test2" class = "test"> </div> and on Controller, page.replace_html "test_test1", "<button>Thanks</button>" please help me to solve this problem. Th...

How might you implement the interceptor pattern on client-side (browser) AJAX request/response pairs?

Let me start with a real-life use case: DWR is getting confused when server-side authentication filters attempt to redirect AJAX requests to the login page due to an expired session. You'd like to add some filters so that Requests whose HTTP status code equal 3xx execute a client-side redirect, like window.location = ...login.html Req...

What jQuery event type is it when Ajax inserts data into an input field?

I have an input field where the user enters an id#. I am using Ajax to check the database for that user's id# and afterwards populate the other input fields with that person's information from the database. I am trying to run a series of validation statements after the information is inserted via Ajax into the input fields, but I can't ...

PHP Ajax Captcha(Securimage) issue

Hi, i have a little problem with captcha validation using php and ajax. this is the php validation: if(trim($code) == '') { $error_captcha = '<p class="error">some empty error....</p>'; $errorc = 'error'; $error = $erdiv; } else if (trim($code) != ''){ require_once ('securimage.php'); $captcha = new Securimage(); $valid = $captcha->c...

ajax how to read out $_post variable

Hi, I am trying to filter/search a database with ajax $.ajax({ type: "POST", url: "filterSearch.php", queryString: qry, success: function(data){ alert( "Data Saved: " + data ); $('#searchResult').html(data); // Fill the search results box } }); Now in filterSearch.php i have the following test codes if(iss...

ThreadAbortException

protected void btnsubmit_Click(object sender, EventArgs e) { try { String qry = "select id from login Where (useremail='" + txtuser.Text + "' AND password='" + txtpasswd.Text + "') "; SqlCommand cmd = new SqlCommand(qry, connect.getConnection()); cmd.Connection.Open(); ...

full ajax site and SEO

Hi i am planing to start a full ajax site project, and i was wondering about SEO. The site will have urls like www.mysite.gr/#/category1 etc Can Google crawl the site. Is something that i have to noticed about full ajax and SEO Any reading suggestions are welcome Thanks ...

Is there a way to remove the native ColdFusion AJAX-loading-animation?

Is there a way, and how can I remove the loading animation that's built into the ColdFusion AJAX functions? <cfinput type="text" name="TitleName" autosuggest="cfc:MyCFC.AutoSuggestSearch({cfautosuggestvalue})"> Using the following code creates a small icon next to my search field which animates while the AJAX request is waiting for a ...

jquery load not working in IE8

Hi web page : http://sideradesign.com/eco-art/gallery/ This code works fine in all brwosers except IE8 (haven't tested IE6/7) jQuery(function () { jQuery("#main-content").append("<img src='../images/ajax-loader.gif' id='ajax-loader' />"); $ajaxSpinner = jQuery("#ajax-loader"); var thisTarget = jQuery('#thumbnail-nav ul li:eq(0) ...

post-it notes in AJAX

I need to create an AJAX widget that would allow a user to simply click on a box and begin typing a few notes. I can take care of the save and edit code. Anyone know of a quick and painless way of going about this? ...

jQuery .load() does not load plug-ins

I have a main page with 2 links that load external files via .load(). The first file has a simple JavaScript rollover, which works when the content is loaded. The second file has a jQuery plug-in that does not work when loaded via .load() - but works fine when the data file is viewed by itself. Main file: http://gator1105.hostgator.com/...

How do I pass an argument to a CFC through AJAX?

Hello, I'm using the following scrip to call a CFC function: function loadQuery() { $.get('QueryData.cfc',{},function(GetMyData){ $("#content").html(GetMyData) }) return false } $(document).ready(function() { $("#loadLink").click(loadQuery) }); This is my HTML: <a href="" id="loadLink">Load It</a> <div ...

visual_effect after replace_html not working in rjs

Hi, In learning ruby on rails I've created a blog site. When the user adds a post via AJAX, the following rjs gets called: page.replace_html 'posts', :partial => @posts page.visual_effect :Highlight, 'post_' + @post.id.to_s However, the highlight isn't happening.. neither is any sort of effect even a hide. Clues: It works if I ju...

Returning data from wikipedia using Ajax?

Is there a service or api that allows wikipedia data regarding a string be retrieved only with javascript? ...

How to have a control dynamically appear (after choosing a dropdown option)

So say I have a dropdown control, and after the user uses the drop down, I want a checkbox and label to appear, AJAX style, without a full postback. How can I implement something like this? Examples of code (or links to them) would be great. I played around with this some using updatepanels but I can't get it working right... ...

echo/print issue in php while loop

I need a fix for this.here is just part of my code <?php $number = 30; while($number > 0) { $number--; sleep(30); print "$number . Posted<br>"; } ?> The loop process in the loop is actually much bigger, i just put the important stuff. Anyways as you can see it should print 30 posted (wait 30 seconds) 29 Posted (wait 30 seconds...

How can I get browser to prompt to save password?

Hey, I'm working on a web app that has a login dialog that works like this: User clicks "login" Login form HTML is loaded with AJAX and displayed in DIV on page User enters user/pass in fields and clicks submit. It's NOT a <form> -- user/pass are submitted via AJAX If user/pass are okay, page reloads with user logged in. If user/pass a...

Should I write a whole procedure for each database table.column I update separately?

I have an application that uses AJAX liberally. I have several places where a single database column is being updated for the record the user is actively editing. So far I've been creating separate stored procedures for each AJAX action... so I've got UPDATE_NAME, UPDATE_ADDRESS, UPDATE_PHONE stored procedures. I was just wondering if...