background preloader

An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET

An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET
MSDN Library Articles and Overviews Web Applications (ASP.NET) Client-side Development An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET Design ASP.NET Pages and Controls That Take Advantage of the DHTML Object Model, Part I Design ASP.NET Pages and Controls That Take Advantage of the DHTML Object Model, Part II Injecting Client-Side Script from an ASP.NET Server Control Life Without Refresh Using JavaScript Along with ASP.NET Working with Client-Side Script 311 out of 448 rated this helpful - Rate this topic An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET Atif Aziz, Scott Mitchell February 2007 Applies to: JSON Ajax Summary: This article discusses JavaScript Object Notation (or JSON), an open and text-based data exchange format, that provides a standardized data exchange format better suited for Ajax-style web applications. (22 printed pages) Contents Introduction Figure 1. Related:  JavascriptProgramming

JQuery Message Box Plugin Download demo - 249.81 KB Introduction Sometimes, when working with JavaScript, we need to write a confirm dialog or message box to display some informative data. We can either use JavaScript alert function or confirm function for such operations. Background JQuery UI library is getting more and more popular for doing web 2.0 style user interface. Using the Code The plugin is very simple and small, download the code block and make a reference to the scripts right after you have referenced the jquery lib and UI lib. To use the plugin, first make a reference in the head section: To display a message box, simply call as follows: $.msgBox("Hello World"); You can optionally specify the callback handler when the dialog is closed or custom title, etc. To display a confirmation dialog, use the following: $.msgBox.confirm("Are you sure?" Now to something more useful, you use the confirmLink method to hook up any links to auto display a confirm dialog. $("#confirmDemo2").confirmLink(); .... History

Play Framework - Build Modern & Scalable Web Apps with Java and Scala SVG World Map Download WorldMap - 1.31 MB Table of Contents Introduction Given the latest developments in the technology area (dear future reader: this is September 2010), we have been flooded with news and also facts stating that web development is going to receive much more focus from now on. Also, the fact that some important mobile browsers (such as Safari in iPad, iPhone) and IE10 in Windows 8 Metro (notice that here I'm talking about the Metro interface, made for tablets, not Windows 8 for desktops/notebooks) do not/will not support plug-ins such as Flash and Silverlight. After some months playing with the basics of HTML5, I was waiting for the right moment to do something with SVG. System Requirements In order to run the SVG World Map sample attached to this article, you must have a browser that supports HTML5 SVG: Internet Explorer 8 or superior Firefox Safari Chrome The Case for SVG jQuery SVG Plug-in jQuery SVG is an awesome plug-in created by Keith Wood. var myDiv = $('#myDiv'); Some Sample Code

ArangoDB - The universal free and open source nosql database JavaScript View Engines and JSON Services Download source - 126 KB Introduction This article will present a model for development of pure client-side applications where all processing logic is implemented using jQuery and information is presented to the user directly on the client side using JavaScript View Engines. In this application model, there is no server-side code except the Web Services that provide data. JavaScript view engines are a new and interesting concept in web development. The logic behind this approach is an assumption that we have powerful and scalable servers, farms, clusters, or clouds on the server-side that can handle any number of requests, and that the client browser is weak and should not have a lot of processing. The general usage of the client-side view engines will be shown in the following example. This JavaScript object can be directly generated from the server-side, returned via a Web Service call, or loaded via some AJAX call. ("#data").loadJSON(data); Background Bing Maps REST API Using the Code

IronRuby - Home XP Style JavaScript Start Menu Download source - 44.01 KB Introduction As the title depicts, this article is about the multi-level, scrollable, browser compatible, XP Style JavaScript Start Menu as well as context menu. Background The need of Start Menu started with a project requirement where there were tonnes of application links to be displayed in an organised manner. Then the solution was identified to implement the Start Menu like feature in the project, which can handle all the application links with ease. So, I started searching for JavaScript menu API which could be moulded into the XP style start menu. Finally, I decided to prepare my own start menu API, and here is the result. Using the Code To start with, you are supposed to carry out the following steps: That's it. Creating a Context Menu Repeat step-2 and step-3 shown above for creating a context menu. Understanding the API Create a StartMenu object using the following code: var menuObj = new StartMenu(containerDivId); Adding the menu items can be done in two ways:

System.Data.SQLite: System.Data.SQLite Download Page Build Product Names Beginning with System.Data.SQLite version (, the following templates will be used for the names of the build products: sqlite-netFx-source-version.tar.gz sqlite-framework-setup-cpu-year-version.exe sqlite-framework-setup-bundle-cpu-year-version.exe System.Data.SQLite.version.nupkg System.Data.SQLite.variant.version.nupkg Templates (1) and (2) are used for source-code packages. The framework in templates (3), (4), (5), (6), (7), and (8) will be one of netFx20, netFx35, netFx40, netFx45, netFx451. The cpu in templates (3) and (4) will be one of x86, x64, arm, ia64. The year in templates (3), (4), (5), (6), (7), and (8) will be one of 2005, 2008, 2010, 2012, 2013.

JavaScript Jargon Introduction Coming to JavaScript from C#, I came across some new terminology, as you would expect. Here I'll run through some of those new terms, with some examples of what exactly they're about. Contents Anonymous Anonymous functions are those with no name. As I've said before, the ECMAScript specification does not have any mention of the term anonymous, so in a sense it is open to interpretation. So, for the avoidance of doubt, this is an anonymous function. var func = function(){ ... }; In this next case, the function is not anonymous because it has a name. function func(){ ... } Now, both of these options will result in a function being defined, and available via an identifier named 'func'. func(); In practical terms, what is the effect of an anonymous function? Closure Closures are a central concept of JavaScript and should be one of the first things that a JavaScript programmer learns. A closure is a functional scope (a set of variables) which is kept alive after the function returns.

Getting Started Database setup with DBTestCase subclass Step 2: Extend the DBTestCase class Now you need to create a test class. One way to use Dbunit is to have the test class extend the DBTestCase class. DBTestCase extends the JUnit TestCase class. A template method is required to be implemented: getDataSet() to return the dataset you created in step 1. You may also use a subclasses of DBTestCase, such as one of these: The following is a sample implementation that returns a connection to a Hypersonic database and a xml dataset: Alternatively, PrepAndExpectedTestCase: (see the class JavaDoc) TODO add example here Step 3: (Optional) Implement getSetUpOperation() and getTearDownOperation() methods By default, Dbunit performs a CLEAN_INSERT operation before executing each test and performs no cleanup operation afterward. The following example demonstrates how you can easily override the operation executed before or after your test. Step 4: (Optional) Override method setUpDatabaseConfig(DatabaseConfig config)

Google Charts in ASP.NET Introduction Through this article, I'll try to explain how we can use Google charts for reporting purposes in ASP.NET web applications. Report generation is something quite common and we need to generate self explanatory and good looking reports to the users almost every time. Google has its own, very awesome and simple application for charting purposes which we will be using here. So to brief stuff down, let’s look at one example. Visit the below link: In the chart, you can clearly see the chart title as “Amount Collection”. Now let’s go through all the parameters that we need to pass to get the required charts. The above mentioned parameters are just the basic ones that you will need to plot charts. Till now, we were just discussing about Google charts. You can refer the below code for much better understanding. Reference Creating Charts with the Google Chart API by Scott Mitchell

The Scala Programming Language jQuery tooltip with Ajax tooltip datasource with gridview Download jQuery Tooltip With Ajax tooltip datasource in Gridview - 4.57 KB Introduction This morning I was trying to integrate jQuery tooltip plugin with grid view. Using the Code The grid view used in this case has the following content: Now on hover of the last delivery date, I am passing Vendor no and item id to the web method. After content is loaded, the following UI is displayed For using this code, we need to have the jQuery and tooltip plugin files. For ease, I am using in memory object as the datasource of the grid as follows: The web method is returning some static HTML for tooltip as below. Here comes the core part of the article. It's very simple.

Fantom Programming Language