Tag | Javascript Posts

I've been very frustrated with the lack of flexibility with wordpress.com hosted blogs, so I am yet again moving. This time I wanted to host my own instance of Subtext but discovered that geekswithblogs.net uses Subtext and figured I would give one last attempt to a hosted community online :) I guess I just don't want to deal with running my own server just for a blog. The most important thing I wanted back was Syntaxhighlighter which was about impossible to use with wordpress.com without paying ...
A great VIDEO series on all the nice effects (and functionality) you can achieve with jQuery JavaScript library for those who know NOTHING about it. jQuery is a very powerful library. One of the first things I do when creating new project is to include the library in it. Microsoft is going to include it by default in ASP.NET web projects (All ASP.Net projects, not just MVC) starting Visual Studio 2010. Here are some few examples of what you can do with it (VIDEO): http://net.tutsplus.com/art... ...
Before I start to explain the topic of this post I should confess one of my many defects: I'm very lazy. Someone may have noticed that from the update rate of this blog, but I really like to avoid as much work as I can. I also really like to experiment new technologies and embedded devices, and that's bad for a lazy guy because that means having to write some code... While experimenting with Silverlight for Windows Embedded I found myself trying to write some more complex samples to continue my own ...
Microsoft has released a new Facebook SDK Version 3.0 (other than their old not-so-great one) and it looks to have not just updated APIs but also wide range of features supported in many application types. Quoting a related blog post from c|net “The web services report” blog: http://news.cnet.com/8301-1... Microsoft on Monday released a software development kit for Facebook that allows developers to create Facebook applications for Silverlight and Windows Presentation Foundation. ...
I thought twice before actually posting this. It was mostly because, of a guilt, that I might be recommending a wrong way of doing things. But then I did realize, that, even if it seems to wrong, it does provide some benefits. Anything that is beneficial, is not necessarily wrong. The problem at hand is, we want to enable ASMX style Authentication in WCF. Its not that WCF does not do a good job when it comes to Security, but because people are more inclined to send the credentials in clear text. ...
This tutorial is based on a short demo/talk I gave at the Columbus .NET Developers Group (CONDG) on IronRuby. It’s mostly designed for the .NET professional and making no assumptions of prior Ruby experience. In Part 1 we get everything installed. In Part 2 we take IronRuby for a test drive In Part 3 we use it to integrate with Cucumber. Installing IronRuby Before we get started, my instructions are more or less the same as this: http://wiki.github.com/asla... … but ...
I am currently studying some of the listed articles which may be of useful for you guys Study material on Object Persistence (This is in Java but subject is general) New things in .Net 4 Beta 2 Javascript Class browser Making jQuery calls to WCF/ASMX with a ServiceProxy Client Disable button during postback Hope they will be of great use. Thanks, Thanigainathan.S ...
This is part 2 of my series on the jQuery UI Dialog. Part 1 – The Default Dialog covered the most basic usage of the dialog widget. In this second part I will demonstrate a simple modal dialog. A modal dialog is a dialog that takes focus, and disables the rest of the application until it is closed. They are used to force the user to acknowledge something, or to gather some input. It is worth pointing out that modal dialogs can be annoying for users so you should consider carefully if it is absolutely ...
Today I was trying to call ASP.Net web service from JQuery. I thought it was easy first. But when tried implementing them I felt the difficulty. I don't had this problem while calling Ajax enabled WCF service from JQuery. Hence I did a small Bing and found out some useful tips to share. I referred links below. http://www.mikesdotnetting.... http://www.dotnetcurry.com/... http://encosia.com/2008/03/... ...
[Source: http://geekswithblogs.net/E... We had a fiddly issue with date validation in an ASP.NET MVC page failing for a valid date in Chrome, but passing in Firefox, IE etc. Tracing through our own code and xVal, the issue was narrowed down to the jQuery validation plugin (jquery.validate.js). For simple date validation, the library instantiates a date object from the given text value and lets JavaScript raise errors for invalid dates: date: function(value, element) { return this.optional(element) ...
This series is going to document increasingly complex usages of the jQuery UI Dialog widget. This first part of the series will demonstrate how to display the default dialog. Other series members: jQuery UI Dialog: Part 2 – The Modal Dialog The jQuery UI Dialog is a powerful client-side dialog control. It is bundled as part of the jQuery UI suite and as such it is available on the Google CDN. Some of its more interesting features are: Modal / non-modal dialogs Support for resizing and dragging Support ...
For those of you who missed the chat today, here is the raw transcript. By raw, I mean that I copied and pasted the discussion without any edits. This is divided into two parts, the top part is the answers from the Microsoft Experts and the bottom part is the discuss (questions) from the audience. Answers from Microsoft: KarelD_MSFT (Expert)[2009-10-27 11:58]: Karel Danihelka - Developer in Partner Response Team. davbo_msft (Moderator)[2009-10-27 11:59]: Our chat today covers the topic of Windows ...
to download the source code please click here The <iframe> tag defines an inline frame that contains another document and is supported in all major browsers. The <iframe> can be placed anywhere in the document flow. The iframe properties such as height and width can be easily modified by CSS and JavaScript. Data can be passed back and forth between the parent container and iframe using Javasrcipt. The document that is displayed inside an iframe can access the main window by the parent ...
XMLHttpRequest (XHR) is a DOM API that can be used inside a web browser scripting language, such as JavaScript, to send an HTTP or an HTTPS request directly to a web server and load the server response data directly back into the scripting language. The technique that we are going to discuss here takes advantage of XMLHttpRequest objects readyState == 3 status (Interactive – Downloading) and responseText property to perform DOM manipulation in a browser. Here is how it works A request is initiated ...
It is quite common to display a loader-image or some kind of progress bar image in a browser when the server is busy serving the request. Before we go deep into page streaming techniques with XMLHTTPRequest call and IFrame, lets look into a simple loader icon implementation – the idea is to display “loading” image until the task completes, display the response in the browser when task ends and hide the loader image. to download the source code please click here Invoke a long task and display loader ...
Here in this series of post I am discussing few techniques to give client instant feedback on task progress in ASP.NET page. In the previous post I have discussed about displaying task progress - using regular handler, here I will discuss how to do the same in standard asp.net page. to download the source code please click here Display task progress – in standard asp.net page In this technique we write some regular ASP.NET script in the page itself, that performs streaming to the original page response ...
So this error stopped my productivity for a good three hours today. Gotta love when that happens. I’m sure there are many different ways to resolve this issue, but I didn’t see anyone with the same problem I was having, so I’m going to go ahead and post my experience and how I fixed it. Background Info: I have a page layout I needed to implement and it uses some rounded corners javascript. My web application uses a masterpage, which I keep in a folder at “~/Resources/MasterPages/”. I’m using themes, ...
1)To ensure debugging of Javascript with VS2008 IDE, you have to make some changes in Internet Explorer. In IE, Go to Tools--->Internet Options. Then in the Advanced Tab, make sure both the following check boxes are unchecked. i) Disable script debugging (Internet Explorer) ii) Disable script debugging (Other).2) Enabling Json on WCF.While enabling a WCF Operation to return data in Json format, you will find that , the tag WebInvoke is not resolved by default namespace references. To take advantage ...
Javascript Intellisense I read this interesting artilce when trying to enable intellisense for my Javascript file. Don miss this as its very useful. Its similar to what we do for VB or C# for intellisense i.e XML documentation. Same concept applies for JavaScript also. This will work in Visual Studio 2008 as there is an enahncement for this. Thanks, Thani ...

Here is a snippet that will check if a JavaScript function exists before executing the JavaScript function.

if(typeof RefreshProducts == 'function')
{   
        RefreshProducts();   
}
Imagine some newbie or junior web developer walks up to you and says, “What tools would you suggest I use to become a better web developer?” Assuming they’re already using either Visual Studio or Web Developer Express, what utilities or resources do you find indispensible for working with ASP.NET or just web development in general? Maybe you have a favorite online resource site that you recommend, Stack Overflow for example, or maybe you have a favorite utility like Chris Pederick’s Web Developer ...
This example shows how to hide a Div when clicking anywhere the page: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>Untitled Page</title> <script type=”text/javascript”> function HideDiv(){ document.getElementById("Co... = 'none'; return false; } function ShowDiv(e){ document.getElementById("Co... = 'block'; if(!e){ e=window.event; } e.cancelBubble=true; return false; } </script> </head> ...
I can't believe how long this took to figure out, I think I read every WCF tutorial out there, and now I look at it it's so mind bogglingly simple I don't know what I wasted my time doing! All I wanted was a WCF service that would accept a POST from jQuery with some JSON parameters and return some HTML, but it seems I repeatedly cocked up the JSON string format and the attributes for the contract. Anyway, here's a simple example so you don't have to endure my frustration. I used .NET 4.0 because ...
If you’re a web developer using Microsoft technologies then, unless you’ve been hiding under a rock somewhere, you’ve probably heard of ASP.NET MVC. If you’re not sure what it is, how it works, or why you would want to consider using it, you’ll find three videos on the ASP.NET MVC page that will answer most, if not all, of your questions. Video #1, titled “Why Use ASP.NET MVC?”, is a 3 minute video which provides a high-level overview of ASP.NET MVC for decision-makers. I especially like the motor ...
This whole IE6 mess starts out with PNGs. I'm not much of an image editor, (okay, fine. I can't crop a picture in photoshop to save my life.) but I do know that PNGs are pretty sweet. Basically they allow varying degrees of transperancy, and really, who can say no to that? IE6 can! One of our clients decided that they wanted a gradient in the header of their site. No problemo, we'll just whip up a gradient image and stick it in the background. That was easy enough, but oh wait there's a bit of an ...
What is something that is longer than a magazine article and shorter than a book chapter? Give up? It's a Wrox-Blox that Wiley has available online with some going for less than $10.00. Written by the best programmers in the their fields, Wrox Blox are short informational pieces and code that will help get you up-to-speed and keep you up-to-date. Build the knowledge you need quickly on a wide variety of topics. In the DotNetNuke world, there are several of these available for you to review and stay ...
Twitter can be a very useful source for data aggregation on any particular topic. Am building an application that will search twitter using their API and then display the results using jQuery. There are 2 ways of accomplishing something like this. We can either do the processing at the server and then populate the page or talk to Twitters REST based api directly from the client. Methods to retrieve data from the Twitter API require a GET request. Methods that submit, change, or destroy data require ...
Most people can agree that testing your software is a good thing. Most developers will agree that unit testing is a great thing to have. But how about testing your web site? Fair enough you can run unit tests on your code behind, but unit testing a GUI can be problematic. If you struggled with this problem, don't worry - you're not the first! I've recently become aware of Selenium. Selenium is a very powerfull tool for testing web applications. It gives you a lot of nice features to help you test ...
Recently I had to code some functionality that required event delegation in JavaScript. After searching I came across this great post by Karl Swedberg about how events can be delegated using jQuery. This can be a very useful approach if you want to add new elements to the DOM and have them react to events without re-binding events handlers or if your page simply has too many elements that need to be wired to an event. The basic concept it simple: Instead of attaching an event to an individual element ...
So a little fun bit of backstory. I'm updating a web form at work and basically what it does is allows a user to order some brochures by selecting the quantity of each brochure they'd like to order. Clicking submit takes you through the process of going to an order confirmation screen, inputting your address and finally getting an order complete screen. Sounds easy enough, right? Well, read on my friends. I got a change request (oh, I do love the change requests..) to add an out of stock message ...
Based on a few examples i found when googling the web, i made a class that can help you query excel sheets in a very simple way with plain vanilla .NET code. Our example file contains one sheet with the name "Sheet1", listing a few employees. Id FirstName LastName Age 1 John Doe 35 2 Bob Smith 42 3 Charlie Smith 40 4 Steve Rights 29 5 Bill Abrams 24 Now lets say that you would like to read all employees from this sheet into an anonymous type list and order the result by age. The following console-application ...
I was recently introduced to the PAL (Performance Analysis of Logs) tool. This is a great tool that allows you to produce HTML reports based on the analysis of performance monitor counter logs. It applies complex thresholds based on those defined by Microsoft. The HTML reports produced include charts and very useful descriptions and links for important counters, they also contain various degrees of alerts for when thresholds are exceeded. These reports can be very useful aids when performance tuning ...
Yes, I know, the multiple file uploading in ASP.NET issue has been exhaustively covered already elsewhere. There are examples of multiple file uploading using ASP.NET user controls, there are examples using jQuery, there are examples using flash to provide progress feedback, and even examples in Silverlight. However, what I wanted was a simple solution which allows the user to select a variable number of files, didn’t rely on postbacks in order to increase or decrease the number of files selected, ...
Are you using the Microsoft AJAX framework with your ASP.NET application and are worried about the cost to maintain and serve up the javascript library components along side your application code? Well Microsoft just introduced the Microsoft AJAX Content Delivery Network. They host, mantain and serve the AJAX javascript library on their servers and you can point to their library files at ajax.microsoft.com from within your application <script> tags. Right now it appears to be limited to AJAX ...
Muljadi Budiman was the top-rated speaker at the recent St. Louis Day of .NET event, and it’s easy to see why. His presentations are energetic, humorous, and packed with useful information. At tonight’s St. Louis .NET User Group meeting, he zipped through an overview of Visual Studio 2010 and 4.0 features of C#, VB, WPF, the CLR and the DLR in a little over 90 minutes. Highlights included: VS2010: multi-monitor support Call Hierarchy visualizer “Navigate To” improvements “Consume-First Development” ...
I needed to get a pop-up window to come up in ASP.Net. Now while JavaScript happily does this (with the alert(); function ASP.Net does not. So I needed to work out how to do it. Another wrinkle in this comes from Ajax. None of the JavaScript code seemed to work when placed in an AJAX page. As I have now been tasked with changing this code and moving from the Anthem Ajax library to a pure MS solution it was time for this died in the wool VB/C# developer to get his head around getting these scripts ...
Problem Statement: To Evaluate a complex expression in dotnet and show the result to end users. The expression could be something like this X2 +Y3+Log10 (z) . Solution: There are different ways to solve the problem stated above. Am planning to show how to use Scripting Engines like Jscript/VBScript inside C#. We can make use of Windows Script Control to achieve this. Windows Script control can be downloaded from MSDN site. It is shipped as an Activex control which lets you make use of JavaScript ...
There are lots of places we can use XML 1. Where we need a place to hold some data, can read / write / manipulate without having any database. Even we can use textfile, but XML is more flexible – say which field, what is the data type, etc., if we use text file, we need to predefine what is the sequence of each column and what dataype etc., 2. Where we need to transfer some data from one pace to another like one layer to another, one tier to another etc., – we can serialize the xml and deserialize ...
The new Italian Windows Embedded support forum is now active: http://social.microsoft.com... Here Italian speaking users of the different Windows Embedded platforms can discuss, post their questions and, hopefully, receive good answers in their own mother tongue (and also my own mother tongue, as you can understand from the poor english of this blog!) ...
Like many ASP.NET developers, I’ve gotten by for years knowing just enough JavaScript to get by. I’ve spent many frustrating hours cursing the language, when the problem was not really JavaScript (although it has more than its share of weirdness), but my assumption that I knew how it worked, just because it looks like C#. Now, thanks in large part to jQuery, I actually enjoy client-side programming. jQuery makes things so much easier (replacing dozens of lines of code that I painstakingly figured ...
Scenario: For some reason you want to stop the user from closing the browser window or from redirecting away from the current page, based on some condition. The solution: window.onbeforeunload = function(event) { return true; } This will prompt you for input (like the JavaScript confirm pop-up menu). There is no way to override the text though. Some concerns: This works great but it may not be what you want all the time, as no matter if you click a hyperlink, hit submit, etc will prompt the user, ...
I was having an discussion with my wife on things to come in computer software and silverlight. below is a brief snippet: My wife holds an computer engineering degree and is passionate about new innovations. She is a prolific programmer though she ONLY codes when she feels like(or finds a problem worth her attention) and thus is NOT a regular coder like mortals like me who are ... well, just coders, who codes for money:D Wife: What is this buzz around Silverlight? Subodh: Because we need smarter ...
Go to the forum control panel, Templates. If want to modify the ForumView, click on it and insert your Adsense code after the very first [BREADCRUMB], ie: <%@ Register TagPrefix="am" TagName="ForumJump" Src="~/DesktopModules/NTFor... <%@ Register TagPrefix="am" TagName="Stats" Src="~/DesktopModules/NTFor... <%@ Register TagPrefix="am" TagName="WhosOnline" Src="~/DesktopModules/NTFor... [BREADCRUMB] ...
Well, for a long time I have been a big fan of open source software, and although I'm not specifically a .NET developer, it's my main focus, as everything I do work related is .NET. I've known about The Mono Project for a while, and I typically run Ubuntu as my OS of choice, with XP running in a VM for when I really need it. Well, I haven't booted up Ubuntu for a while, having been really busy doing work stuff, so today, I decided that it was time to take Ubuntu's Latest version, Jaunty Jackalope ...
All right, so it may have been a day or two since my last post. I was hoping I'd have the option to post-date to make it look like I was a much more diligent blogger than I really am, but oh well. Apart from just wanting to look like I blog more regularly than once a quarter, there's actually a lot of material to cover. I'm not sure exactly how I want to accomplish this, so there might be a spate of blogs close together just to cover all the things I've worked on so far and the challenges involved. ...
For many customers the ROI on software licences is one of the key factors when purchasing software, so when deploying an e-Commerce solution the level of return for frameworks, and CMS platforms such as Commerce Server and MOSS are quite justifiable, however it is the extra features – such as the Store Locator that is difficult spending licensing money on. The current store locator within CS 2009 is based on a commercial Microsoft Virtual Earth web-service, which is provided for non-developer used ...
Remember when a program was termed a “GUI Application” - a program with a Graphical User Interface? It had features like menus that “dropped-down” (or “popped up”), scroll bars to reveal more of the virtual surface area, a pointing device (still called a cursor), and lots and lots of Drag & Drop. Thankfully, that moniker has mostly died. Now it is time another term to fall by the wayside – the Web Application. What is a Web Application? Just what is a web application, anyway. An application delivered ...
This is a topic that has been beaten to death. I know it, you know it, but I'm still going to give my version of it, just because I can. One thing I'm going to try to do different from every other "implementation" of this topic, as actually make it practical. It's great that for good design you should follow <insert design pattern of choice here>. And for the crowd that's going to comeback with "The design pattern isn't as important, so long as your code follows the SOLID Principals", well, ...
So, today I was working with the ASP.NET Report Viewer Control. If you don't know what that is, it's an ASP.NET control that comes with .NET, and what it does is allows you to display a SSRS Report on your website. True to ASP.NET, it seems very simple at first, drag, drop, set parameters... and then of course, there's the fallbacks on the things it cannot do. A major thing to me, when I'm developing a website, especially recently, is performance. I hate going to a website, and waiting more than ...
I had looked up the LoadControl(“”) method earlier today, and came upon a short website entry that quickly discussed how to load a web user control (.ascx) dynamically onto a page. The link is: http://www.codeproject.com/... It mentioned inside that a CMS (content management system) could be built using this method + a database table to track these controls. It got me intrigued, so I decided to pursue it. It’s pretty simple, and actually adds a lot of cool functionality ...