jquery-ajax

jquery.get() - problem using data as global variables

Well, I've read a lot in the Net, bust still haven't found a solution to my problem: I need to check if the content of a file is "nok" or empty ("") using the jquery method get. One of the things I tried (didn't work of course, but shows clearly my idea) is: $(document).ready(function(){ $("#submit").click(function(){ ... var captchac...

jQuery POST and GET methods: Construct URL or use data param?

I am using the post and get methods for Ajax calls, and have a general question. There are two methods I've seen people use on the web: Construct the URL and parameters by hand Use the data parameter Both approaches work. I've included them below: // Construct the POST URL by hand queryStringDelimiter = "?"; settings.queryParam =...

JSON response not working?

I'm new to JSON/jQuery, and I'm trying various JSON-AJAX examples. Unfortunately, my simple code doesn't seem to be working. Here is my JS/jQuery in testjs.js: $(document).ready(function(){ $("#radio").click(function () { $.getJSON("testphp.php", { testtest: 'blah' }, function(data){ alert(data.response); }); })...

how to clear the ajax cache in ie

I'm using jquery ajax, how to clear the cache of the ajax result? ...

jquery load breaks when the hostnames are different

The code segment is from a page called "sites-catchup.html". There is a simple server side page called "max-change-num-ajax.html" which returns a single number (without any html). If the page is requested by calling http://tiddy:8080/rsm/sites-catchup.html then it all works. However if I call http://localhost:8080/rsm/sites-catchup.htm...

jQuery Ajax passing the Form Collection

I was wondering if it is possible to pass the forms collection from within an ajax method in jQuery? $.ajax({ type: "POST", url: "/page/Extension/" + $("#Id").val(), data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { $("#resul...

jquery - do [x] after mutiple .load

Once all three loads are complete... $("#sidebar a").live("click", function(e){ $(this).addClass("selected loading"); $("#conceptual").load(conceptualUrl, null, function(){ $(this).removeClass('loading').show("fast"); }); $("#development").load(developmentUrl, null, function(){ $(this).removeClass('loading').show("fast"); ...

problem with images load on setTimeout

Hello everybody, I have a problem, that i seems not be able find my way around it. The problem is, that I load images and some text trough ajax call, and then after some time i try to call ajax function again to get new set of images and text. However my problem is that images don't load in time (everything is fine with the text load) ...

Possible to select (inner)text of content that is loaded through a async (ajax) call?

I have a simple tree view that is loading child nodes through a ajah call to the server. I'm going to abbreviate the html but you should get the gist. <li id=1>Node 1</li> When this is expanded (by being clicked on) there will be a bunch of sub nodes loaded through a ajah call (they are not on the page to begin with): <ul> <li i...

Refire certain scripts after jQuery AJAX load.

I need certain scripts to refire after an AJAX load. How could I accomplish this? ...

'Collapse all' problem with jQuery Treeview plugin

And the problem is that after I click on the 'Collapse all' link, 'some' of the pluses and minuses are displayed opposite to what they should be: i.e. an 'expandable' node would be shown with a minus next to it. Apart from that, the tree works correctly. (Well, the 'expand all' functionality is affected, as well but I think this is part ...

$.get to load and show content in div only once content, including images, are ready.

I am using a get to load content to a div and then show it. Works great, very easy. $.get($(this).attr("href"), function (data) { $('#boardData').html(data); $('#boardContent').show(); $('#BoardImages a').lightBox(); }); I would like to only show the div, my $('#boardContent').show();, once all of the images have loaded from my...

Disabling ajaxSetup Defaults for some AJAX Calls

The corporate intranet I built heavily uses AJAX calls to load tables and other resources. By default I have a modal dialog box appear with a loading gif to let the user know the page is loading. I set this default up with jQuery's ajaxSetup. There are a couple of areas where I use a search box with autocomplete. And I noticed ever...

IE - why it doesn't get changed?

Hi all, I've a got a: it works in FF but not in IE problem with my jQuery code, here the little snippet of code jQuery(this).click(function() { jQuery.post(href + '&rnd=' + Math.random(), function(data,status) { jQuery('.progress').show(); if(status == 'success') { var d = jQuery('<div id="insertDiv" />')....

Add a unique ID to form input for total

Hi, The problem I'm having is i'm working on an invoicing system. Which uses this, $(document).ready(function() { $('#add').click(function() { JQuery('#lineItems').append('<input type="text" name="description[]" class="ui-corner-all text invDesc" /> <input type="text" name="qty[]" class="ui-corner-all ...

Get some context inside of a jquery callback function

Pretty simple question, I think, here's what I'm doing: function buttonOnClick() { var relevant_context = 'important data'; $.get('/test', relevant_context, callback); } function callback(data) { alert(this.data); // always null, expected to be 'important data' } I expect this.data to be the contents of "relevant_context"...

Should I just let the user hang?

Hi I am not really sure what to do in this situation. I have some jquery ui 1.7 tabs that are ajax enabled. Now when a tab is clicked it goes to my asp.net mvc controller action method. That then does whatever is needed and return a partial view. Now I don't know why but sometimes my server hangs but then again I am guessing all server...

jquery ajax ($.post) showing an icon while the request is being processed

Hi all, I am using jquery's $.post for ajax (like populating a selectbox with a value selected in different selectbox). I used the following code for this $('#cmbState').change(function(){ $.post('<?php echo APP_URL."include/ajax.php"; ?>', {stateid: $(this).val(), option: 'getCitiesList'}, function(response){ if(response != '') ...

JQuery Ajax - How to Detect Network Connection error when making Ajax call

I have some Javascript JQuery code that does an Ajax call to the server every 5 mins, it's to keep the server session alive and keep the user logged in. I'm using $.ajax() method in JQuery. This function seems to have an 'error' property that I'm trying to use in the event that the user's internet connection goes down so that the KeepAli...

JQuery Tab - Make Selected tab clickable..

Hello, I basically need the current selected tab to remain clickable (meaning the link should still be active). The content in the tab is loaded through ajax and can change, so the way the person can "refresh" the content it by clicking the tab again. But the default settings make the tab not clickable once it's selected, which makes t...