Questions tagged [jquery-get]

42 questions
0
votes
3 answers

How can I force a synchronous $.get call to load contents of a file into a variable?

I understand how $.get() fetches asynchronously. But how can I force a synchronous call? I require preferences loaded from a json file to be used throughout many javascript calls throughout an app. How can I load these preferences not into the DOM,…
Ryan
  • 14,682
  • 32
  • 106
  • 179
0
votes
1 answer

Can't get jQuery ajax method to work

I have 2 html files named host.html and test.html I have tried so hard but I can't get to load test.html file as the content of mydiv in host.html I have tried: $("#myDiv").load("test.html"); but it fails; then I tried using the following ajax…
Muhammad Usman
  • 163
  • 1
  • 4
  • 20
0
votes
1 answer

jQuery "get" not loading content completely

I have my main file loading a second php file like this: $.get('single.php?admin=1&start=1').success(function(data) { $('.loader').fadeOut(400, function() { $('#overlay').html(data); $(".content h2").css({"padding-top": "50px"}); …
SSH This
  • 1,864
  • 4
  • 23
  • 41
0
votes
2 answers

JQuery GET function only work first time when call on change() function

I've following method asscoiated a drown box $('#cboUsuario').on('change', function cargarAccesos(){ var username = $('#cboUsuario').val(); $.get('listEmpresasAcceso', {usuario: username, accion:…
Cesar Miguel
  • 661
  • 1
  • 13
  • 38
0
votes
2 answers

Jquery: .load() with for loop, always takes the element

Im have a jquery code that running in loop over my images and load them one by one, All works fine beside the fact that it inserting to the 'a' tag the last image in results! Here is my code (Please take a look in "var a"... it should insert the…
Eran Levi
  • 363
  • 7
  • 22
0
votes
2 answers

using get method fetching html data, getting wrong response result

I am using jQuery get method to load html's data to store in to my array, for that i use this method: var temps = function(views){ var tempts = []; $.each(views, function(i,view){ if(view){ tempts.push($.get("templates/" + view +…
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
0
votes
2 answers

Javascript for loop blocking rest of code

I am having a little trouble with some Javascript that I have written. The purpose of the code is the following: Read list of SKUs from a provided .TXT file Split the data at each line For each object make a lookup on a provided JSON api to get…
0
votes
1 answer

.get() method in jquery mobile doesn't load when changing pages

I have a mobile application built with phonegap and I'm using jquery mobile. On the first page I have link to another, href="page2.html". When the second page loads, I am using .get() to retrieve xml data and convert it to json using xml2json.js.…
Mark Kamyszek
  • 398
  • 2
  • 5
  • 15
0
votes
1 answer

jQuery load information from elements in different elements

How do i get the href value from a link that is loaded with $.get? My scrip always uses the value that used to be in the div, not the value that was loaded afterwards. The code:
content …
Bart Rylant
  • 173
  • 1
  • 1
  • 7
0
votes
1 answer

$.get for each item in an array of deferred objects not quite working

I have an array of object that I'm trying to iterate over and build markup for a list from. I'm using an array to store the deferred requests and $.when to inject the concatenated markup into the DOM after all the request have been completed. Here's…
jszpila
  • 676
  • 9
  • 24
0
votes
1 answer

jQuery.get() and returned html data: how to extract piece of codes?

Suppose that you can retrieve an HTML page through a call by using the jQuery.get() function, e.g. as follows: $.get('xxx.php', function(data) { //handle data, that is HTML code.... }); Is there any jQuery solution to extract…
JeanValjean
  • 17,172
  • 23
  • 113
  • 157
0
votes
1 answer

javascript get/post cross domain restrictions and facebook/google+ like boxes

as far as i know there are cross domain restictions that wont allow you to get content from an external url and in order to overcome this , we use server side scripts. Im wondering how facebook/google overcomes these restrictions and with a…
lior r
  • 2,220
  • 7
  • 43
  • 80
1 2
3