Questions tagged [jquery-get]

42 questions
4
votes
2 answers

Store ajax result in jQuery variable

I started using jQuery and ajax to get data from database, but i cant find out how i can save result of $.get() into variable outside callback function. This is my jquery script: var result=""; $.get("test.php", function(data){ result=data;…
pastx
  • 117
  • 3
  • 4
  • 9
2
votes
2 answers

JQuery .get doesnt execute Javascript

I am using JQuery .get method to retrieve some content from a webpage (page 1) and show it in a div in the main page. The problem is the content retrieved contains some javascript calls. The content is being displayed, but the Javascript methods are…
Ctroy
  • 577
  • 1
  • 10
  • 20
2
votes
5 answers

jQuery - check for POST in the URL

Is there any way to check with jQuery for POST within the URL similar to the PHP way? PHP version: if(!empty($_GET)) { // do stuff } Sorry. I mean GET not POST. I'm looking to fetch the URL on the page load $(document).ready( function() { // here…
Iladarsda
  • 10,640
  • 39
  • 106
  • 170
2
votes
2 answers

Making an ajax get request with django

Trying to simply make an ajax call to my view and get the template html back. $(document).ready(function () { $.ajax({ url:url, data:{language:'English'}, dataType:'html', success:function (data, status, xhr) { …
Warz
  • 7,386
  • 14
  • 68
  • 120
2
votes
1 answer

How to get jQuery ajax calls to work from greasemonkey page events

I have a GM script which inserts a link on to the page, and then adds an event listener for when its clicked. This then runs a function which contains among other things some jQuery.get calls. These calls however do not seem to fire unless I use the…
Dan
  • 1,343
  • 2
  • 9
  • 12
1
vote
2 answers

Does jQuery's $.getScript behave differently in Firefox ? It's not executing the script after loading it, Chrome is doing fine

The following code $.getScript("/js/dygraph-combined.js") .done(function(script, textStatus) { console.log(Dygraph); }) .fail(function(jqxhr, settings, exception) { console.error('it failed to load'); }); yields Dygraph is not…
João Pinto Jerónimo
  • 9,586
  • 15
  • 62
  • 86
1
vote
3 answers

Problem with assigning data to JQplot chart getting data dynamically using jquery

I'm trying to do the following: Get some data from the backend and bind it with a JQplot candlestick chart. What i've accomplished: The data is being generated in the backend The data is being procured by using the $.get() function of jQuery. So…
Shrayas
  • 6,784
  • 11
  • 37
  • 54
1
vote
1 answer

jQuery append with `.load()`without using `.get()`

It appears that one (of many) differences between .load() and .get() is that the former can use an HTML fragment, while the latter requires that said HTML fragment be a fully valid XML structure. I'm trying to load an external file that is a…
DA.
  • 39,848
  • 49
  • 150
  • 213
1
vote
1 answer

How to insert data from get function into CSS method?

In my jQuery script I use the get function to extract data from a PHP page called "external.php". The data extracted is a simple path to an image (e.g. images/house.jpg). I need to use this path to specify the css value background-image of a div,…
user1190547
  • 51
  • 1
  • 6
1
vote
1 answer

Cannot access outside variables from the jquery get function

I am trying to turn csv into associative array but the $.get function does not change the outside textData variable function csvToArray(filename){ var textData; var headers = new Array(), dataValues = new Array(); $.get(filename,…
1
vote
1 answer

I want to get all content of a div using jquery

I want to get all content of a div using jquery.
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
1
vote
4 answers

jquery add variable to $.get url parameter

I´ve been banging my head against the $.get-function of jquery. I´m trying to do something like this: $("#button").click(function(){ var value=$("#textfield").val(); alert(value); $.get('lookup.php?s=&q=+ value',function(data)…
user2095033
  • 27
  • 1
  • 8
1
vote
1 answer

greasemonkey and jquery get not working

I am using jQuery with GM 1.5 and have found I am unable to use .get I require http://code.jquery.com/jquery.js and my code is just this this.$ = this.jQuery = jQuery.noConflict(true); $(document).ready(function () { $.get('index.php',function…
Dan
  • 1,343
  • 2
  • 9
  • 12
1
vote
1 answer

jQuery .get and .append in IE7 makes current content disappear

The code works on Firefox, Safari, Chrome and IE8+ but not in IE7. It causes the content to disappear. I have tried developer tools in IE and if I locate one of the rows in the content and add any CSS to it, the content reappears. I call the…
CaptainBli
  • 4,121
  • 4
  • 39
  • 58
1
vote
1 answer

jQuery .get and .css setting background image

I have several divs making up a single button on a menu. Using jQuery, I'm trying to update the divs to a hover background image, without using individual selectors. $(document).ready(function () { $(".menuitem div").on('hover', function () { …
Jack Guy
  • 8,346
  • 8
  • 55
  • 86
1
2 3