.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

jquery json google ws api

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net
i am trying to get the google json from my local host

and i getting: Line: 4984 Error: Access is denied. from the jquery
what is missing?? 

well this is the code
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function () {
        var _url = 'https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=fuzzy%20monkey';
        var _serverParam = "";

        $.getJSON(_url, _serverParam, theCallBack);

        function theCallBack(theData, theStatus) {
            alert(theData); alert(theStatus);



View Complete Post

More Related Resource Links

Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

jQuery UI Autocomplete, Web Services and JSON

Hi guys, this is my first post, I´m desperate after wasting 2 days in google and reading forums ans sites. I can´t make it work. I just want to provide the name of cities to show in the autocomplete plugin. Let´s go part by part:WEB SERVICE: I use the Json.Net component to serialize a datasetpublic string ConsultTable(string data) { SqlConnection connection = new SqlConnection(WebConfigurationManager.ConnectionStrings["SqlServerConnection"].ToString()); SqlCommand command = new SqlCommand("SELECT name FROM cities",connection); connection.Open(); DataSet dataset = ToDataSet(command.ExecuteReader()); Newtonsoft.Json.JsonSerializer json = new Newtonsoft.Json.JsonSerializer(); json.NullValueHandling = NullValueHandling.Ignore; json.ObjectCreationHandling = Newtonsoft.Json.ObjectCreationHandling.Replace; json.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore; json.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; json.Converters.Add(new DataSetConverter()); StringWriter sw = new StringWriter(); Newtonsoft.Json.JsonTextWriter writer = new JsonTextWriter(sw); writer.Formatting = Formatting.None; writer.QuoteChar = '"'; json.Se

Can I write a wcf endpoint to communicate with JSON from Jquery on page?

Hi Guys,I need to be able to expose information to a page, and I need to write the information in xml on my webserver which will be dynamically created from the database. I need to use json to pass the data from the screen back to the server two way communication xms back and forth. Is it actually any good using a wcf endpoint to serve the json back to the page and use query with wcf? Is this possible?Or is it easier to use standard pages .aspx and just do a call to a url and get the json with jquery....We will probably want to send this information to other locations at some point in the future too....Cheers,Pete

MVC Json and Jquery with dropdownlist


 Dear all,

I want to do like below:

I have three dropdownlist:

- test

- test1

- test2

and i have two textbox

 - txtname

- txtsex

when i click on test dropdown list i want to diplay data in test1 dropdownlist and display in txtname and txtsex too, how can i do by using mvc json and jquery ?

how to save and retrive date in database using jquery ajex asp.net ,JSOn,XML,HTML


how to save and retrive  date in database using  jquery ajex asp.net ,JSOn,XML

jquery ajax - bind json to dropdownlist


I'm using jquery ajax to populate a dropdown list to avoid page refresh via a webmethod.

My webmethod returns a json string. My question is how can i bind this to my asp.net dropdownlist?

See below for jquery code:

function getTeamid() {
        var teamid = $(".ccTeam").val();            
            type: "POST",
            url: "NewJob.aspx/sayHello",
            data: "{val:" + teamid + "}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(msg) {
                error: AjaxFailed


    function AjaxSucceeded(result) {
    function AjaxFailed(result) {
          alert(result.status + ' ' + result.statusText);

See below for webmethod code:

        public static string sayHello(string val)
            DataTable dt = dbTeam.getJobTypesByTeamid(val);
            return Intranet.Core.Util.GetJSONString(dt);            


jquery ajax json



I've finally got my dropdowns populating via jquery,ajax and json (via page methods). It works fine, until I submit the page I get error shown below. What's the best way of fixing this?

Part of me is tempted to just install asp.net ajax/update panels and use this, however, I really want to avoid this as I want to stick with jquery ajax and json especially as I've spent time learning this. thanks.

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. 


Google Mail (Gmail) checkbox dropdown - jquery


I want to reproduce the "checkbox dropdown" that you see in Google Mail (Gmail). The one that lets you select all or none or flagged... etc. How can I do it with jquery?

Accessing JSON Data From an ASP.NET Page Using jQuery


I am trying to load the JSON data that I am getting from an aspx page into a drop down list that I have on another page but I am getting the following javascript error.

Microsoft JScript runtime error: 'SiteID' is null or not an object

The SiteID is not returning null though and I believe that is an object. The following is the code I am using to try and load the data into the drop down list:

$.getJSON('Test.aspx?DepotID=' + DepotID, function (sites) {
                        $.each(sites, function (index, elem) {

how to save data with jquery using json


a page contain

<table id="Grid_Event1" cellspacing="0" rules="all" border="1" style="font-family:verdana;font-size:11px;border-collapse:collapse;">

							<th scope="col">OWNER</th><th scope="col">FORMCODE</th><th scope="col">ID</th><th scope="col">COMPANY</th>


how to save every row in database using jquery json

Post JSON data to WCF RESTful Service using jQuery

The POST request method is basically designed to post data to a web server for storage. That's why its normally used when submitting a complete form. In this WCF RESTful service tutorial, I'll try to explain how we can post JSON data to a WCF RESTful service using jQuery Ajax call with POST type. We discussed about "POST" HTTP verb in previous WCF tutorials but we didn't use it in our implementation. Purpose of this article is to understand "POST" request with complete implementation for a specific operation.

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend