Tag | Javascript Posts

So we’re into Day 2 of Build, and the keynote this morning is talking about server and cloud aspects of Windows 8. I’m looking forward to the sessions this afternoon to get some deeper dives. But let’s reflect over yesterday first – Build Day 1. Yes, there was a tablet given away. But those focusing on the “new toy” are missing the bigger message, the larger paradigm shift, the impact on the future of what we’re seeing. I sound melodramatic saying that, but its true – the way development for the ...

As usual when I attend a conference, I like to take quick notes to remember what it was all about and take some time later to analyze it. Since Windows 8 is going to be the next big things, let me share my notes with you!

Read the rest of this entry »

We want to dynamically show an image below a span html element. The javascript creates a div element, than assigns new offsets using jQuery offset() and then appends the div to document.It worked as expected in FireFox, but moved the new element to the bottom of the page in IE.I found, that if I will call offset after document.body.appendChild, it will assign values correctly.In the test page below if offset is called after document.body.appendChild, new img assigned left: -8, top: 110img left: -8, ...
Recently I attended Microsoft HTML5 WebCamp where I had a chance to get insights on all new features HTML5 has to offer. Couple things to mention: - Canvas - a new HTMl5 feature that uses JavaScript to draw bitmap graphics on a web page. Simple approach (less JS coding) makes this interesting: empty space is treated as a painter canvas and a painter brush is replaced with JavaScript. - SVG (Scalable Vector Graphics) is another graphic tool widely publicized. It is not new, it has been around for ...
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders post can be found here. This post continues a series of Little Wonders in the BCL String class. Yes, we all work with strings in .NET daily, so perhaps you already know most of these. However, there are a lot of little fun things that the String class can do that often get overlooked. ...
I’ve always liked Red Gate products. Reflector is a great tool for decompiling assemblies to see how something was constructed, and the ANTS Memory Profiler is an excellent tool for discovering sources of memory issues in your applications. So when I had a chance to really examine the latest ANTS Performance Profiler (6.3), I jumped at the opportunity to see how well it works. Background A performance profiler’s main job is to keep track of how much time is typically spent in each unit of code. This ...

At  http://oreilly.com/javascript/index.html, O'Relly have put up a page of JavaScript Development and Resources. It includes many free book sample chapters.

 

Recently I implemented a rather complex page allowing the user to input pairs of colors and quantities, with some relatively "odd" validation rules. I knew that I probably wanted to implement the page entirely with javascript and probably jquery templates, but for a demo I just needed a quick prototype of the page, so to get that done I threw together a quick and dirty webforms page using the telerik radgrid to display the data, but not save & validate. Took me maybe 2 hours including some basic ...
Today's $10 Deal of the day from APress at is "jQuery Recipes A Problem-Solution Approach". "jQuery is one of today's most popular JavaScript web application development frameworks and libraries. jQuery Recipes can get you started with jQuery quickly and easily, and it will serve as a valuable long-term reference. " ...
At http://99-bottles-of-beer.n... an old drinking song that printed out by an award-winning piece of code obfuscation cited in a Wikipedia article at http://en.wikipedia.org/wik... inspired a comparison of programs written in various languages to print this song. The Cobol (and to a lesser extent C#) programs were easy to understand whereas other languages such as J*** were not. There was even a highly obfuscated one in JavaScript! At http://blogs.msdn.com/b/alf... ...
Today, O' Reilly are offering three book deals: 1) JavaScript Web Applications Use discount code: DD388 $13.99 (Save 50%) 2) Programming Microsoft ASP.NET 4 Use discount code: DDGRM $23.99 (Save 50%) 3) Big Data Now: Current Perspectives from O'Reilly Radar Price: FREE! (this third book is not available as a PDF so download one of the following readers) http://www.mobipocket.com/e... https://addons.mozilla.org/... Can't code withoutIn-depth ...
Issue: Use the .Net JavaScriptSerializer to serialize an object but due to circular references need to prevent from those properties from being serialized. Solution: In order to ignore certain properties from getting serialized, simply add the ScriptIgnoreAttribute attribute to the property: [ScriptIgnore] public virtual MyClassCausingCircularRefError MyProperty { get { return _privateField; } } ...
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders post can be found here. I’m going to begin a series of Little Wonders in the BCL String class. Yes, we all work with strings in .NET daily, so perhaps you already know most of these. However, there are a lot of little fun things that the String class can do that often get overlooked and ...
I recently delivered a Zeollar session on Using HTML5 Local Storage in ASP.NET Applications Following it up with a blog post on the contents, since a few mentioned that the code was not better aligned/readable. Local Storage and Offline Web Applications are 2 promising features of HTML5 going around the web apart from the (already tired of?) Videos. Local Storage (persistent storage) is not entirely new since we had cookies ever since sliced bread (or seems to be so). But, the limitation of 4KB on ...
I am a reformed former JavaScript hater. In the 90s and early 2000s I muddled through JavaScript compatibility issues, poor performance and a lack of development & debugging tools. When ASP.NET came out, promising to hide me from the complexity of browser incompatibilities, I fully embraced server-side web development. This approach may have worked in 2002, but it does not today. The world's expectations have been reset by Ajax, Google Maps, mobile web sites, high performance JavaScript engines, ...
Rich internet applications are growing fast in the business and enterprise application landscape as more and more software managers and corporate decision makers are electing to place rich internet applications (RIA's) into their organizations. But with the many advantages of rich internet applications over the client/server deployments, organizations also find many new aspects they need to master and overcome - one of them is understanding the new security vulnerabilities of the rich web based applications ...
Issue: Due to an upgrade from .Net 2, 3.0 or 3.5 to .Net 4.0 or you are starting a new .Net 4.0 project, you may run into this message: A potentially dangerous Request.Path value was detected from the client Or A potentially dangerous Request.Form value was detected from the client Environment: .Net 4.0 MVC 3 (could be MVC 2 also because of the controller/action action filters that are available) Fix: Lets tackle the first issue: A potentially dangerous Request.Path value was detected from the client ...
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders post can be found here. Today we will look at five easy ways to aggregate sequences. Often times when we’re looking at a sequence of objects, we want to do perform some sort of aggregation across those sequences to find a calculated result from the sequence. The methods we will be looking ...
Here is the screenshot of final output. Here is what PoC is doing 1. There is Silverlight application hosted in CRM on custom area-subarea. This in-turn needs two web resources 2. There is Custom button added in Ribbon 3. Third web resource is hosting JavaScript function 4. On click of Custom Button on CRM Ribbon function in JavaScript web resource is called which in-turn calls the method in C# code of Silverlight application. String input is passed to this method 5. C# method is converting the input ...
Official Site | Samples | Download | Documentation | Forum | Twitter Introduction jqChart takes advantages of HTML5 Canvas to deliver high performance client-side charts and graphs across browsers (IE 6+, Firefox, Chrome, Opera, Safari) and devices, including iOS and Android mobile devices. Some of the key features are: High performance rendering. Animaitons. Scrolling/Zoooming. Support for unlimited number of data series and data points. Support for unlimited number of chart axes. True DateTime ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for August 14 - 21, 2011. Here are the top 5 news on SilverlightShow for last week: The Top 5 WPF and Silverlight Gotchas Can Microsoft ‘fix’ JavaScript and make HTML5 applications viable? The LOB Chronicles - Exploring User Experience (UX) Slides for our upcoming 'Deep-DIVE in Silverlight FIVE' webinar Mango Baby Steps: Unit Testing your WP7 app Visit and bookmark SilverlightShow. Stay in the 'Light ...
The WebBrowser control uses behind the scenes the IE engine to render the pages. Fortunatelly/Unfortunatelly is that, we have together with the rendered page the IE-default shortcuts, the context menu shown after pressing the right mouse button etc. To disable e.g. refreshing the page by pressing F5, we can set the WebBrowserShortcutsEnabled property to false. To disable the context menu, the WebBrowser control have either a property, called IsWebBrowserContextMenuEnab... When we set it to false, ...
JQuery is probably the most popular JavaScript library ever. I was facing a bad "time" requirement change tonight and that was poping up "Terms and Conditions" pop up as a mandatory option for registration. I just picked up fife minute solution: You will need Fancy box (fancybox.net) but just whatch out to not overwriting JQuery references, they need to loaded sequentially and could easily drive you to a horrible nightmare! 1-Set References: <link rel="stylesheet" type="text/css" href="Scripts/jquery.fancyb... ...
I was recently asked to review Studio for Wijmo MVC by Component One and, overall, I am impressed. There are 2 major components of this. The first is Wijmo Complete which is a collection of over 30 UI widgets (very similar to jQuery UI). The second is Wijmo Scaffolding for MVC which builds upon the scaffolding that was released as part of the MVC 3 Tools Update (note: is does *not* build on top of powershell-based MVC Scaffolding which Microsoft released earlier this year). Some of the Wijmo widgets ...
After setting up the Cross Domain parameters properly, using _setDomainName(), _setAllowHash(), and _setAllowLinker(), and making sure to call the _trackPageview() last, using ga_debug.js in Chrome, I was able to see that the AccountID and the SessionID were still changing upon navigating to the other Domain. This meant the cookies were not being shared across the Domains using the _link() method from Google Analytics Asynchronous Library. So what is the [workaround]? After carefully studying how ...
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders post can be found here. Today we’re going to look at a very small, and sometimes helpful static method of the object class. Of course, we know most of the key methods of the object class by heart, especially the ones we tend to override often such as Equals(), GetHashCode(), and ToString(). ...
I have a client that desired to have the MOSS 2007 capability of My Links but in no way wanted My Sites in SharePoint 2010. I took some steps that gave them the capability of My Links by creating a personalized web part that could be linked to in a modal. It worked, However, in addition, they didn’t want users without web admin rights to see the SharePoint ribbon. The result was that admins could use the web part and the personalization data would be kept by SQL in the personalization database. Members ...
Microsoft isn’t the only one who seems to be pushing native computing once again. We’re now seeing Google at the same table with the current beta release of Chrome. Yes, Chrome now supports native applications to be embedded in a web site and it’s just like embedding JavaScript. More information can be found in here: http://chrome.blogspot.com/... The native client SDK runs a sandbox environment which means Chrome handles security of the module just like ...
I’m a big fan of client-side development using HTML / CSS / JavaScript for about the past 2 or 3 years – really ever since I dug into jQuery and really began to appreciate the power that the technologies on the client-side possess. Nowadays, everything is HTML / CSS / JavaScript – it’s in all the articles, all the techies are talking about it, and it’s on everyones’ resumes. In looking at candidate resumes or listening to presenters speak about web technologies, we constantly hear “HTML / CSS / JavaScript”. ...
Occasionally I write a rant or two and this one has been boiling for ages. First off you need to read Mike Watson’s Blog Post on Silverlight Ambiguity in Office 365: http://jmikewatson.wordpres... So now let’s get started. First off this post has been boiling since I have heard the question in one of my sessions last year “What do you think will happen to Silverlight now that HTML 5 exists?”. I brushed it aside. I ignored it when ...
Javascript is a very powerful tool to enhance the user experience. However, poorly optimized javascript can have a very negative effect due to increased page load time. This becomes particularly apparent as the number of elements on a page increases thanks to controls bound to increasingly large data sets. For those that are new to jQuery, assuming we have two divs (div_drag and div_drop), we can add drag and drop functionality by registering listeners during our form load: $("#div_drag").draggable(); ...
I am a firm believer that, regardless of the framework you use, if the framework is good it provides you all of the things you need. I believe ASP.Net MVC 2 is good and therefore provides me everything I need. This means I don't need to write a significant amount of custom UI code (jQuery, MVC Ajax, etc.) to do things that should be considered "standard". One of these pretty standard things submitting a form via Ajax. MVC provides for this very well with Ajax.BeginForm. The contents of the form are ...
This Friday and Saturday I will be giving my C#/.NET "Little Wonders" and "Little Pitfalls" presentations to the St. Louis Day of .NET Conference in St. Louis, Missouri at the Ameristar Casino and Conference Center. I'm including the presentations here for the attendees and anyone else interested. The C#/.NET Little Wonders presentation has been touched up a bit. C#/.NET Little Wonders View more presentations from BlackRabbitCoder The C#/.NET Little Pitfalls presentation is brand new, let me know ...
Now that I've got a few javascript applications under my belt, I'm strating to see a pattern emerge. A javascript app for me always starts with three files. An html, a css, and of course a js file. This is the triangle that makes the base for your application to build upon. The fourth piece that I always include is a reference to jQuery. I wouldn't even try to write a javascript app without it. It's the defacto framework that makes javascript programming tolerable and should be included in any project ...
This blog has been relocated to http://blachniet.com. See this post at it's new home: http://blachniet.com/2011/0... is post is meant to be a more straightforward overview of my previous post. The previous post got a little long and turned into a walthrough. If you need a walkthrough of this, check out that post at http://geekswithblogs.net/b... So in my new exploration ...
After writing this post, I realized that it is obnoxiously long, and maybe includes a little bit too much hand-holding. Nevertheless, I decided to post this very detailed step-by-step walkthrough of implementing a simple AJAX form in MVC3 with Razor. I'm probably going also post a shortened version of this topic for those that don't need a complete walkthrogh. So I've been attempting to dive into ASP.NET MVC 3 lately, and have hit plenty of bumps along the way. This is my first encounter with any ...
Today at work we had an interested request come in from a client. They had an iPad and couldn’t scroll on their SharePoint 2010 website. I went ahead and pulled out my iPad 2 even though I am mostly a Microsoft guy and decided to look around on their site. Their homepage loaded fine and a couple others did also. I kept browsing and discovered one page that just cut off when you tried scrolling. I decided to try all of the iOS web browsers that are free so I downloaded them all and none of them solved ...

Today's $10 Deal of the Day from APress at http://www.apress.com/9781430272199 is JavaScript for Absolute Beginners

"If you are new to both JavaScript and programming, this hands-on book is for you."

C# is a wonderful language for modern programming. While everything in C# has a reason and a place, occasionally there are things that can be confusing for a developer who isn’t aware of what is happening behind the scenes. This is my fifth post in the Little Pitfalls series where I explore these issues; the previous Little Pitfall post can be found here. Side Note: I’ll be presenting sessions on the Little Wonders and the Little Pitfalls at the St. Louis Day of .NET conference on August 5th and ...
ASP.NET Detect and alert forms authentication timeout With help from & thanks to PsychoCoder at http://www.dreamincode.net/... 1. Add sessionState to web.config <system.web> <sessionStatetimeout="1"... /> <!--minutes e.g. 120 = 2 hours--> 2. Add FormsAuthentication to web.config <authenticationmode="For... <!--timeout minutes (needs to be the same as in sessionState above) e.g. 120 = 2 ...
Official Site | Samples | Download | Documentation | Forum | Twitter With jqChart jQuery Plugin is easy to create real-time web charts using only HTML and JavaScript. Visit our live Live Data Chart sample. Official Site | Samples | Download | Documentation | Forum | Twitter ...
I was working on a MVC3 project using jQuery to populate a text input in an iframe element from the parent. The catch is that the iframe source is on a different domain. When I first tried to do it, the javascript gave me the Permission Denied error for trying to access the iframe document in a different domain. If the domain of the parent and iframe child are the same this Permission Denied error will not be encountered. To get the iframe domain the same as the parent I needed to use a proxy to ...
C# is a wonderful language for modern programming. While everything in C# has a reason and a place, occasionally, there are things that can be confusing for a developer who isn’t aware of what is happening behind the scenes. This is my fourth post in the Little Pitfalls series where I explore these issues; the previous Little Pitfall post can be found here. Today we are going to look at a potential pitfall that can bite developers who expect the default behavior of declaring the same method (with ...
I have a need for a highly responsive web page that must at least appear to be "pushed" information from the server as it happens, much like you'd see with an HTTP protocol based chat window. The client will utilize JavaScript, and will use JQuery and its UI plugins, and will use its AJAX support to call the requests that will only return when there is data to be "pushed". I know HTML 5 includes support for WebSockets, but I feel it is too soon to rely on them, as the spec is not yet finished and ...
As mentioned in a previous post, I have been accepted to speak at VMworld2011 the week of August 29 in Las Vegas. Since that time I have been working on my presentation with my speaking partner and VMware SE Jeff Szastak. We have submitted the first draft of our deck in for comments and gotten some good feedback. I have now begun to incorporate those changes in to the deck as the final version is due in early August. I am excited to be going to this conference for the first time and especially so ...
At http://www.mindscapehq.com/... there is a new free Visual Studio 2010 add-on. "You may have noticed that this new-fangled Web thing is getting quite a bit of traction at the moment. And these days you can’t get away with static Web pages built with table-based layouts and presentational markup. It’s all script this and stylesheet that and jQuery the other. Why, even those time-hallowed animated GIFs of little men digging ...
C# is a wonderful language for modern programming. While everything in C# has a reason and a place, occasionally, there are things that can be confusing for a developer who isn’t aware of what is happening behind the scenes. This is my third post in the Little Pitfalls series where I explore these small pitfalls; the previous Little Pitfall post can be found here. In the last Little Wonders post, we talked about the Nullable static class (not to be confused with the Nullable<T> struct) and ...
Yesterday I received an email from Jetbrains to notify me of the release of ReSharper 6. Highlights of ReSharper 6 include: Rich support for JavaScript, CSS, HTML, and ASP.NET MVC 3 (Razor) Bundled assembly decompiler New navigation actions and valuable additions to existing navigation features Code inspections and quick-fixes for code quality analysis in VB.NET code Multiple new code inspections and quick-fixes for C# Improved refactorings and context actions, including those helping convert LINQ ...
I was informed on July 1st, 2011 that I was awarded a Microsoft Visual C# MVP recognition for 2011. I'm very thankful to have been nominated and selected, and thankful that you guys all find my posts informative and useful! I'll try my best to keep up the good work! Thanks to everyone! Tweet Technorati Tags: .NET, C#, MVP ...
Today we are glad to announce HERMES, an Open Source Infrastructure for publish subscribe messaging model based on MongoDB and RESTful Services. This is 8th release of an open source project from TellagoDevLabs on Codeplex. Hermes is months of hard work by us, including Silvio Massari, Jose Romaniello and Gustavo Machado. Hermes is not BizTalk Server. BizTalk Server has pub-sub mechanism in its infrastructure but in very traditional way and it hasn’t provided a foundation that can be seamlessly used ...