Hey all,
I'm playing around with ASP.net MVC and JQuery at the moment. I've come across behavour which doesn't seem to make sense.
I'm calling JQuery's $.getJSON function to populate some div's. The event is triggered on the $(document).ready event. This works perfectly.
There is a small AJAX.BeginForm which adds another value to ...
Hi!
I have a html code:
<button>asd</button>
<script type = "text/javascript">
$('button').click(
function() {
$.getJSON('/schedule/test/', function(json) {
alert('json: ' + json + ' ...');
});
}
);
</script>
and corresponding view:
def test(request):
if request.method == 'GET':
json = ...
I am using jQuery and jQuery UI.
Using the getJSON function, we are creating list elements and appending them to an OL element. Here's the code:
$.getJSON("http://localhost/b/t.php", function(data){
$.each(data, function(i, thet){
//alert(thet.fname)
var t = '<li class="name" id="p' + thet.pid + '">' + ...
Hi,
I am making a call to a controller action in javascript using the getJson method. I need to pass two parameters to my action method on the controller, but I am struggling to do so. I do not fully understand the routing tables and not sure if this is what I need to use to get this working. Please see example below of what I am tr...
I've been trying to make an ajax request to an external server.
I've learned so far that I need to use getJSON to do this because of security reasons ?
Now, I can't seem to make a simple call to an external page.
I've tried to simplify it down as much as I can but it's still not working.
I have 2 files, test.html & test.php
my test.htm...
Google offers a wonderful REST interface for geocoding and reverse geocoding an address. My API key is valid, and if I enter the request directly into the browser address it works great. However, the following jquery fails terrible and I'm failing to see why. Hoping you could help me out here.
$.getJSON("http://maps.google.com/maps/geo?...
Having some trouble getting this to work, specifically with $.getJSON(). I want to wrap the getJSON function from jQuery in a Javascript function like so:
function reload_data() {
$.getJSON("data/source", function(data) {
$.d = data;
});
}
But when I call reload_data() it doesn't execute the jQuery function inside. Any...
I am very new at jQuery ... I've used Javascript many times and am quite familiar with DOM manipulation but simply not the API or gears of jQuery.
I am dynamically adding DOM elements via a JSON call like so:
$(document).ready(function() {
var url = "jsonMenuItems.js";
$.getJSON(url, null, function(data) {
v...
var query1 = urlencode($('input[name="searchTerm"]').val()); //user1
$.getJSON('http://twitter.com/friends/ids.json?screen_name='+ query1 +'
});
This is a simple code that gets the json data from the url
http://twitter.com/friends/ids.json?screen_name=Planemad&jsoncallback=?
(click url to view the json data)
The data looks like...
$.getJSON('http://twitter.com/followers/ids.json?screen_name=' + query1 + '&callback=?', function (data) {
console.log('JSON data string 1 is: ' + data);
$.getJSON('http://twitter.com/followers/ids.json?screen_name=' + query2 + '&callback=?', function (data1) {
console.log('JSON data string 2 is: ' + data1);
f2 = ...
I'm writing a web application and need to initialize some parameters that I'm pulling via the $.getJSON() method.
$.getJSON("../config/", function(data)
{
console.debug(data);
}
Now since these values will be used globally throughout the script and will not be triggering an event directly (which is the only implementation of $.g...
Hi,
How do I go about calling a method on an ASP.NET Web Form page using the getJSON method on jQuery?
The goal is this:
User clicks on a list item
The value is sent to the server
Server responds with related list of stuff, formatted using JSON
Populate secondary box
I don't want to use an UpdatePanel, I've done this hundreds on ti...
Anyone know how to do a JSON call to the Yahoo Boss API? Ideally the URL for the documentation on how to do this...
Thanks, Mark
...
String.prototype.getLanguage = function() {
$.getJSON('http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q=' + this + '&callback=?',
function(json) {
return json.responseData.language;
});
};
How can I return the value to the caller value?
Thanks.
EDIT: I've tried...
I have a script that outputs a json string via json_encode in PHP. The json string consists of
[{"custId":"2","custName":"John Inc"}]
The PHP script is initiated using
$.getJSON("customer.php", function(data){alert(data + ' ' + data.custName);});
The response is -
[object Object] undefined
Javascript recognises 'data' as an...
I have a very simple javascript class that does an ajax call to a web service of mine via jquery. It returns the data successfully, but I am unable to retrieve it via a variable I set the data to. I don't think it is a matter of the ajax call being asynchronous or not b/c I have set up event handlers for all the ajax events, but some d...
Turns out this was an artefact of a Firebug bug. The Ajax request was cancelled, but Firebug continued reporting it as active. Details here.
I have long running XMLHttpRequests and I need to be able to abort them under certain circumstances.
I set up the request in a normal way:
ajax = $.getJSON(url + "?updates", function(data) { .....
Hey,
I'm trying to use the ajaxStart and ajaxStop events with getJson calls to my webserver. The ajaxStart event is triggered on the first request, but not on subsequent requests. The encID ensures that each requested url is somewhat unique. It doesn't work on Firefox 3.5 or IE 7. In firebug, I can see the the getJSON requests are f...
Hello all,
I'm trying to run a simple getJSON to a PHP file using:
$.getJSON("loadThumbs.php", { usrID: 25 }, function(data){
alert(data.filename);
});
And when the alert messages pops up it reads "undefined."
Here's my PHP file (loadThumbs.php):
$usrID = $_GET['usrID'];
$sql = "SELECT id, isDefaultProfile, filename, usrID FR...
I have a php page called 'dataFetch.php' which sits on one webserver. On another webserver, I have a JS file which issues JSON calls to dataFetch. dataFetch connects to a database, retrieves data and puts it in a JSON format which is fed back to the calling program. In IE, this works fine. In other browsers it does not because of the cr...