jquery-ajax

jquery ajax work in mozilla, but not IE

I know jquery/ajax in IE is a common problem. There is a lot of great advice here on stack overflow but none of it has worked for me yet. The following code works just fine in firefox, but does not in IE: $.ajaxSetup({ cache: false }) $.ajax({ url: 'FunDataService.asmx/' + funDataMethod, type: 'POST', dataType: 'html', cache: false, ...

How would you manipulate an html list on the server side?

How would you create a new html li element dynamically in the code behind (server side)? How would you access an li in an existing ul element on the server side? I need to FindControl get all li items and then add new li item. Update I'm using jquery ajax to access server side, so I must use static WebMethod. FindControl is non/static...

asp.net MVC: Making an Xdocument available to jquery?

Hi there, Can anyone help, I have got an Xdocument which opens an XML files on the disk and returns it to the view in asp.net mvc... Everything is working ok. The problem being is that i need to manipulate the data with jquery, how do i pass this data which is asp.net mvc to jquery? here is what i have XDocument xdoc = XDocument.Lo...

Kill JQuery AJAX overlapping requests

Hi All, Is it possible to kill a previous ajax request? We have tabular data very adjacent to each other. On mouseover event of each data we are making a request to our server using JQuery Ajax object and showing in popup. But as frequently we move mouse to other tabular contents previous Ajax responses are being displayed inside popu...

Jquery: Problem passing XML to function using $.get

Hi there, I seem to have an issue passing the xml i am reading to a function.. Basically i have this, this seems to work $.get("content/xml/faq.xml", function(test) { alert(test);// TEST CONTAINS THE XML }); but i really want to isolate the function and have the get call a new function but "data" in my function is und...

problem with json-web-service call within jqModal

I have a page that loads another page via ajax and jqModal. In that other page, there is a button that calls a web service using json. This button doesn't work. What could be the problem? What other solution do you propose to achieve this? ...

jQuery, $.load doesn't work in webkit and opera?

Hello, I'm trying to load an external document using jQuery, $.load call. It seems to work in IE6, IE8 and Firefox 3.5, but it doesn't work in Opera and Webkit browsers (Chrome and Epiphany)... all of them report (in their developer consoles) that they load external document successfully, but they don't show its content. Test case is h...

How to load content pages async using jQuery?

TGIF, I have a website I'm developing which is using ASP.NET masterpage/sitemap/content pages setup. I hate the "blinking" the site does when navigating between content pages using the asp:menu control. Any suggestions on how to use jQuery ajax instead of AJAX.NET updatepanels? I've used updatepanels in the past and I hate it; clunky an...

jquery ajax error

I have many places in my code doing "$.ajax" call can I define one place to handle all errors ? I know there is "error: function ... " that I can place in each call , but I want to write it just one time ...

jQuery Ajax pageload <div> puzzle

Still learning this jQuery stuff.... I like this ajax page loader; it works for Wordpress on a <div id="content"> right out of the box. But one thing bothers me: the collapses while ajax loads the page and spins the spinner, and I'd like to be able to have the div retain some of it's size instead of making the footer of the page jump u...

Issues parsing XML with jQuery in IE6

I'm trying to extract values from xml using jQuery in a cross-browser compatible fashion. I'm not having any issues doing this in firefox, but unfortunately this also has to be IE compatible. My jQuery code looks like this: $(document).ready(function()) { $.get("file.xml", {}, function(parseRefreshTime){ alert('This line is execu...

returning JSON response to a ajax call prompts file download containing the response

i am submitting a from using jQuery ajax, and server is returning json response. but instead of the script, parsing the json result, the browser is prompting me to download the json response. I have had this problem before, where i forgot to return false at the end of the event handler. But this time im clueless why this is happening. ...

jQuery.ajax call fails inside Chrome extension

I'm porting one of my Firefox extensions to Chrome, and I'm running into a little problem with an AJAX query. The following code works fine in the FF extension, but fails with a status of "0" in Chrome. function IsImage(url) { var isImage = false; var reImageContentType = /image\/(jpeg|pjpeg|gif|png|bmp)/i; var reLooksLikeIm...

jQuery Dialog posting of form fields

I'm trying to do some data entry via a jQuery modal Dialog. I was hoping to use something like the following to gather up my data for posting. data = $('#myDialog').serialize(); However this results in nothing. If I reference just the containing form instead myDialog then I get all the fields on the page except those within my dialog....

jQuery: In $.post call, callback is not being processed until the end

Hello. I have a $.post function inside of a loop. All it does it call a php function to validate an input. If the input validates, it returns "true" (which I tested and works). At this point I use a callback to do some processing and it is not working. For example if i am looping over three items, the callback function processes the th...

jQuery watch for domElement changes?

I have an ajax callback which injects html markup into a footer div. What I can't figure out is how to create a way to monitor the div for when it's contents change. Placing the layout logic I'm trying to create in the callback isn't an option as each method (callback and my layout div handler) shouldn't know about the other. Ideally I...

How to only execute jquery code if input is greater then 0 and is a letter key?

So i’v been going though the tutorial on: http://jqueryfordesigners.com/play-school-easy-ajax-load/ (site seems a bit slow at the moment BTW) I’v tried using: if(this.value.length > 0) { But it doesn’t seem to work. When I type something into the input forum it will load the test1.php every time even if I just press say shift. (this ...

Using AJAX with ASP.NET MVC 1.0 on IIS 6

I am running into a problem trying to use AJAX and jQuery with ASP.NET MVC on IIS 6.0. I receive a 403.1 error when I attempt to invoke an action via jQuery. Is there anything I must add to the web.config in order to support this? Client Code <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="../...

Why does jquery ui ajax loaded tabs interfere with other ui methods?

I am trying to use jquerys ajax loaded tabs, along with other ui plugins such as accordion and dialog box. Everything will load fine via $(document).ready function, but if I try to use any of the methods after initial loading, the methods fail. But if I take out the snippet that loads the tabs, they work. So I think the problem is how...

jquery ajax post - json is returning but not working right

I've started the following skeleton for an ajax/post/update function I'm wanting to write in javascript (using jquery): $.post("/gallery/resize", function (data) { alert(data); alert(data.complete); if (data.complete) { alert("done"); } else { alert("blah"); } }, "json" ); And the response script ...