Tag | Javascript Posts

Ext JS is a very powerful javascript UI library which allows you to create a rich internet applications. Ext JS is very easy in use, in learn and has very intuitive API. Supports all major web browsers (IE, Opera, Firefox, Safari). Starting with this post I would like to initiate a series of articles explaining the nuances of how to use a basics Ext aspects in web developments with ASP.NET MVC and how to create a great-looking user interfaces in web apps. Links to all related articles to this tutorial ...
This is a part of EXT JS Tutorial To successfully carry out everything that has been described in this article you need: Normal 0 21 false false false PL JA X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:Standardowy; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.000... line-height:115%; ...
Hey All, I know of the conditional CSS code you are supposed to use when modifying css on a per-browser basis. Recently I ran into an Issue with IE8 only, a search box was not aligning vertically with the search button next to it. This was working in FF2, FF3, IE6, and IE7. IE8 was the odd man out. In this case, conditional css was out of context. Then I found this article: http://www.ironpaper.com/cu... AMAZING Works ...
Originally Posted Here: http://www.thegrubbsian.com... I’m almost positive someone has come up with this pattern before, but it was a big help on a recent project so I thought I’d share it. The basic goal of the pattern is to make the setup and teardown work of test classes reusable. We found this to cause particular pain for integration tests written against a database where multiple dependent records needed to be created before the actual test could be performed. ...
In my previous blog post, I have discussed about how to get asynchronous JQuery treevew to work with ASP.NET Webservices, and we identified that, to make a successful ASP.NET webservice call using JQuery the request must be POST request, the content type of the request must be “application/json; charset=utf-8”, and the data parameter of the the $.ajax() method must be passed as a string. We also looked at the tweaks that we need to do to the jquery.treeview.async.js file to get that working. However ...
Was doing some research this morning, as usual, and came across a post from Giulio Bai on jQuery performance tips. A lot of his tips are things I’ve heard elsewhere (no offense!), but one that I haven’t seen anywhere and for some reason surprised me is that using a the JavaScript provided for() loop is considerably faster than using jQuery’s each() function. In fact, it can be several orders of magnitude faster depending on what you’re doing. Interesting. Link to his post Technorati Tags: jQuery,performance ...
A few days ago I got an error report to fix. Some web application that I now maintain was inserting duplicate records. After a quick look it became obvious that the users where double clicking the submit button and that made the page post twice and so a duplicate record would appear. A quick fix dor this problem using javascript: <script language="javascript" type="text/javascript"> var haveSubmitted=false; function FirstSubmitOnly() { if (haveSubmitted) return false; haveSubmitted = true; ...
This example shows the basic way on how to access control from external javascript file (.js). Normally, we use the following line below when accessing control within our JavaScript method in the page. document.getElementById('&l... TextBox1.ClientID %>'); AFAIK, Using Inline expression like <% %> will not work within external js files. As a workaround we can pass the id of the control (eg. TextBox) to the funciton as a parameter instead like: External JS file: function GetControlValue(obj) ...
In this Submittal-only Issue: Davide Zordan, Michael Washington, Charlie Robbins, Alex Golesh(2), Pencho Popadiyn, and Danijel Stulic From SilverlightCream.com: Silverlight 3 / Expression 3 behaviors for enabling Multi-touch gestures Davide Zordan provides two Behaviors for gestures with a Multi-Touch device. Don't miss Tim Heuer's article he references, and if you're a WPFer, he also has a companion post A WPF custom control for enabling Windows 7 Multi-touch gestures Silverlight 3 Drag and Drop ...
I had one of those problems that I had trouble resolving with a search engine this past weekend. Once it was pointed out to me what I did wrong, it was really quite simple. Basically, I needed the enter key to fire a function from a certain input textbox. I wrote up a jquery script, and it worked for IE, Chrome, and Safari, but it did not work for Firefox. Here was the script. $("#Location").keydown(func... { switch (event.keyCode) { case 13: findFresh(); break; } }); Do you see the problem? ...
There is a compilation of quite a few "How Do I?" videos related to windows mobile here. Take a look in your free time, some videos might be of interest to you. Videos I liked: How Do I: Use Bing inside a Windows Mobile Application? How Do I: Create Localized Applications on Windows Mobile Devices? How Do I: Use the GPS Intermediate Driver to Retrieve Location Information? How Do I: Associate an Application with the Hardware Buttons on a Windows Mobile Device? How Do I: Schedule an Application to ...
I didn’t leave work until 8PM this evening. I was wrestling with a JavaScript/JQuery problem and it became a personal battle to bend this application to my will. (Maybe in some future post I’ll talk about how horrible that is.) So I didn’t get it before I left, but I came home and started hitting it here on a test project. There seems like there are probably some scripting conflicts in our project (we have the JQuery stuff and prototype in there), so it didn’t take be but about a half-hour at home ...
1. Create a CSS Class that allows you to highlight invalid inputs and display messages in a pretty way input.error { background: #fed; border: 1px solid red; } 2. Create validators.js. Here are the contents from that file: ValidatorCommonOnSubmit = function() { ClearValidatorCallouts(); var result = SetValidatorCallouts(); return result; } ValidatorValidate = function(val, validationGroup, event) { val.isvalid = true; if ((typeof(val.enabled) == 'undefined' || val.enabled != false) && IsValidationGroupMatch(val, ...
Usually the style you organize code is just that A MATTER OF STYLE, in javascript however it’s not. If by any chance you end up writing the following code: var display = function() { this.x = 10; return { alert: function(message) { window.alert(message); } } } you might be in for a surprise but it won’t return anything because by default the javascript interpreter inserts ; after every line that doesn’t already contain it or }. Instead you should write: var display = function() { this.x = 10; return ...
When we develop our silverlight widget the sample page that we use normally is a nice servier side control called asp:Silverlight, that’s quite nice if you use ASP .net 3.5 SP1, but… what if your widget has to run on ASP .net 2.0, or PHP, or a plain HTML page… Well… the first thing to note down is just that asp:Silverlight control is a nice server side control that is translated into HTML, no more no less. You can as well define directly an OBJECT tag and instantiate the control. What are the main ...
When building RIAs there is sometimes both the need for complex rich interfaces and simpler standard html interfaces. This is more common when introducing the rich experience into an existing web application where it makes sense to maintain some of the existing functionality and introduce the power of Silverlight in targeted functions. In such a circumstance when we have business functionality in Silverlight and in ASP.NET/HTML pages - wouldn't it be great if we had the ability to interop between ...
In my continued exploration of C# 4.0, I wanted to put together a simple example of using the C# 4.0 “dynamic” keyword in conjunction with IronRuby. I’ve been shocked at how difficult it was to find code samples on the internet that actually do this. With much persistence (and some significant pointing in the right direction from Justin Etheredge) I got my simple example working. Given that there aren’t many great examples of calling IronRuby from C# 4.0 out there, I figured I better post the code. ...
The need As certain as the sun rising tomorrow, there will come the point where you will want to display a list or grid with paging. While many solutions exist, and many component developers are coming in with robust solutions, a simple and satisfactory solution can be created fairly easily. Implementation Why create a pager from scratch? Several reasons: 1) You want to control the pager completely – display, style and all. 2) You don't like the idea of JavaScript paging, which will load your hundreds ...
In my last blog I talked about the new site around SharePoint 2010 and the sneak peak videos. I got a chace to watch them and here are my notes: SharePoint 2010 Feature Highlights: New User Interface including new Ribbon Web Edit Silverlight Web Part Rich Theming Browser support for Safari, Firefox and IE Visio Services SharePoint Designer enhancements Business Connectivity Services (BDC evolution) SharePoint Workspaces (formerly Groove) or offline libraries Richer Media Support SharePoint 2010 Admin ...
Ok it seems that lot’s of members at the forums is asking on how to display multi-line text in a JavaScript pop up box. So I decided to write this example so that other developers can reference it or if I encounter such a post in the forum then I can simply point them in this example. Check the following code blocks below: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>Untitled Page</title> <script type="text/javascript" language="javascript"> ...
My general rule of thumb (which I actually read on some other site or blog, or maybe in a book or on the msdn?) is that if you plan on using a control once or twice, use a web user control. If, however, you want to use it all over your program, you should invest the time to make it a server control. They are much easier to use in the program (in the long-term), since they allow you to drag and drop them from the toolbox and you can pass them between programs easier as a DLL instead of a .ascx file. ...
Originally posted here: http://www.thegrubbsian.com... I was listening to a recent Hanselminutes podcast episode in which Scott spoke with Michael Feathers of ObjectMentor on the topic of legacy code. They touched on a number of really effective techniques for approaching a legacy code-base and I wanted to echo some of their thoughts and add a few of my own. First, the definition of legacy code (as was discussed in the show) is really much broader than the face value ...
Translation of original post by Scott Guthrie: / Tlumaczenie oryginalnego posta napisanego przez Scott’a Guthrie: http://weblogs.asp.net/scot... Zespól ASP.NET wlasnie opublikowal pierwszy preview nowej wersji ASP.NET MVC – MVC Version 2. Mozesz pobrac go tutaj. Preview 1 dziala w srodowisku .NET 3.5 SP1 i VS 2008, i moze byc zainstalowane równolegle z ASP.NET MVC 1.0 (co oznacza, iz nie pojawi sie miedzy nimi konflikt, a dotad dzialajace ...
This post is the fourth in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves. To read all posts in this series, or to get started with the RSSBus WebPart, go here. #4 – List Active Directory Groups and Users This web part will list each user group and its members, as defined in your Active Directory (or other LDAP server) installation. Step one is to make sure you have the RSSBus Web Part installed. See here for instructions. Step two, make ...
A while ago I was building a tree and I decided that it would be a great idea to load its branches on demand. At the moment, the best way I could figure out to do this was using some JavaScript and my beloved PageMethods. After coding and coding I got it working, and it worked wonderfully... The day came when my tree was moved to the production environment, where it would use a big data hierarchy. The main issue was that some of the branches loaded lots of data, and when I expanded one of them I ...
Hello, Finally Microsoft had announced the RTM (Release to Manufacturing) for Windows 7 and Windows Server 2008 R2 on July 22nd. Windows 7 will be available to customer's around Oct 22nd 2009 and Windows Server 2008R2 somewhere around that date. For more information visit here. I have Windows 7 Ultimate installed on my laptop last week and before it gets fully expired Microsoft will have Windows 7 RTM released. Glad to hear that. Thanks, Vishal Mody ...
Another great opportunity to ask Microsoft engineers your technical questions is coming up on Tuesday, June 30th. These chats are your opportunity to get advice and answers from the engineers at Microsoft. You may want to review the transcripts from previous chats to get an idea what these chats are all about. Title: Windows CE Live Chat! When: Tuesday, July 28, 2008 9:00 - 10:00 A.M. Pacific time Add to Calendar Description: Do you have tough technical questions regarding Windows CE or Windows Mobile ...
An old fix but I felt necessary to post If you open IIS on any of your SharePoint servers and it comes up blank, it is because there are too many threads connected to it at the same time. This is due to the wonderful Timer service for SharePoint. There are two ways to fix this: 1. Do an iisreset (temporary fix) 2. Install this hotfix http://support.microsoft.co... (permanent fix) The hotfix should also fix the following events in the logs that would not go away for anything - Event ID 6398 ...
I had to make our site work in SSL mode and ONLY SSL mode. I also had to allow url's that pointed to our site before I forced it work in secure mode. I also had to allow for all the other domain names that we own work in SSL mode. I thought I would share how to get this done right so no matter what it works. Create an HTML page named 403-4.htm. Put it in a folder outside your web site’s root folder. Give the page your company’s logo and some nice looking text that states; The page must be viewed ...
I’ve always wished I could customize the skin on my blog at GeeksWithBlogs.Net. GeeksWithBlogs is built on SubText, and of course its just a skin, but since GWB is hosting my blog and I don’t have control over the skin files myself I am limited to what I can do with it. Well, today I finally did it, after some inspiration from John Resig (@jeresig) and his “Easy Retweet Button”. I added a “Tweet This!” button to the footer of each post. First, I modified the default styling of John’s retweet.js so ...
Having had my brush with SharePoint and its intricacies, and after learning that its original iteration was classic ASP flavored with Javascript and XML, I became intrigued about re-usable web components and how I could go about creating my own. I decided not to bother with .NET, as this was just a little experiment designed to get me into coding-for-fun once again. I decided to go classic ASP with a sprinkling of Javascript and XML and a whole lot of XSLT. My project was a webpart-enabled web portal ...
In this post, I will explain you how can we show Loading message in asp.net ajax without using Update Progress. Now some one may asked, why do I want to skip Update Progress ? Well, there can be several reasons for this, fist of all you have to work on every single page, and on every update panel to get the update progress working. There are basically three methods of meeting this requirement. Using Master Pages : A very smart way, but not all of us are using them .. right ? Extending Page Class ...
In this Issue: David Anson, Expression Blend and Design Blog, Scott Marlowe(2), Michael Washington, Soul Solutions, Gavin Wignall, Bill Reiss, Timmy Kokke(2), and Jeff Blankenburg(2). Shoutout: The Swiss MSDN Team blog has a post: Welcome to SurfaceTwitter, a multi-touch Twitter client for the Microsoft Surface! ... wow would that be cool to have... but hmm ... hard to carry around :) For those of you that mentioned it, I not only added a SketchFlow tag, but I retagged all the older SketchFlow articles ...
This ones a bit long but here it goes. Here’s my reiview of the Tomy Micro Slot Owners slot car set. Okay, not so computer related but very geeky. There seems to be very little information on this particular set of slot cars, so hopefully someone can find this review of use. Back of box, more attractive then the front of the box. A little back story. I've played with slot cars as long as i can remember. I remember getting slot car sets for Christmas several times. Those were some of my fondest Christmas ...
Incorporating the jQuery Grid With ASP.NET MVC Scenario: You have an ASP.NET MVC application and don't want to custom build smart controls like the ASP.NET GridView, ListView, etc, that support sorting and paging, as well as filtering and searching for data, and all of this using Ajax. Solution: The jQuery Grid plug-in. What tools/plug-ins do I need? jQuery version 1.3 and up jqGrid version 3 and up (this post references version 3.4.4) A strong cup of coffee In the past you had to also add the jQuery ...
http://msdn.microsoft.com/e... Temporary Tables vs. Containers Microsoft Dynamics AX supports a special data type called a container. This data type can be used just as you would use a temporary table. For more information, see Containers. Data in containers are stored and retrieved sequentially, but a temporary table enables you to define indexes to speed up data retrieval. Containers provide slower data access if you are working with many records. However, if you are ...
Last year when MVC was still in CTP, I blogged about using MVC ComponentController and ViewUserControls to render widgets. When MVC CTP4 was released, the ComponentController was eliminated from the framework and the RenderAction() helper method was introduced. Rob Conery has a good post that discussed that here. Despite the ComponentController being eliminated from the framework, I still frequently get questions about the older blog post as well as asking for the code sample to work with the current ...
When I set up my first KiGG site, I was surprised to discover that I had to manually publish articles. I assumed it would be an automated process that would run once a day. Since there are times I may not be able to log into my website, I set about figuring out how to automate the process. I should note that during this process, I didn’t use best practices. I had one requirement: make a program that I can schedule to publish stories on KiGG. I wasn’t really sure what I would need to go about doing ...
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.000... mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ...
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.000... mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ...
*taptaptap* Is this thing on? I ran into an interesting bug recently, where you would get 2 identical requests to the page you were visiting. I wasn't sure where this was coming from, so I poked around a bit. It turns out that having an <img /> tag on a page with an empty src attribute (like so: <img src="" />) causes that image tag to point to the containing page, causing the entire page to get requested again (causing any server-side code you may have to get executed again), but the ...
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.000... mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ...
Scenario: What is calling a Javascript function. You may have a situation where a function in your code (or anyone else's for that matter) that is loaded into a web page is being called many times, and although in the Firebug profiler you may see the function being called 1000 times, you want to know who is responsible for calling it. The problem: You may use the console.log in Firebug to do this, or even break in the function and step out of it to see who is calling it, but this may be difficult ...
Hey everybody! This is my first post so I guess I should start by introducing myself. My name is Sebastian, actually is Sebastián since I'm from Argentina, and as many of you guys, I develop software, not only for a living, but also for the mere joy of building things! I've been working with ASP.NET for over a year and a half, and I really enjoy developing web apps, specially when it comes to using JavaScript to bring flexibility and agility to the websites! My idea is to use this blog to share some ...
If you’ve ever written a standard .NET ASMX web service before, you know the drill. You make your service, build out your web methods, publish your service, make your consuming web project, point your project to your service via a web reference, and voila! You get strongly-typed proxy classes auto-generated for your web service consumption pleasure… But this comes at a great cost. WSDL is slow, clunky, and bloated. All that proxy code that is generated results in serializing, packaging, unpacking, ...
All this while, we have been blitting the spaceship image: onto a black surface: giving an image which looks like: Thus giving an illusion that only the spaceship has been Blt on to the screen. But if our background was anything but black, things would look a lot different. For e.g. if our background was blue: the resulting Blt() would have looked like this: which, as you can see, is not very appealing to the eyes. Enter the concept of transparent blitting! With transparent blitting, you can specify ...
When I am using Google Docs, quite often I am copying the portion of code from Visual Studio or SQL Management Studio. but the text is reformatted to become messy. E.G. ALTER PROCEDURE [dbo].[CheckNotProcessed] @limit int = 10 AS declare @StartDate datetime declare @EndDate datetime declare @NotProcessedCount int is shown as ALTER PROCEDURE [dbo].[CheckNotProcessed] @limit int = 10 AS declare @StartDate datetime declare @EndDate datetime declare @NotProcessedCount int I've tried to manually insert ...
Ok, that was cool and somewhat easy. Sign up for Google Analytics add your GeeksWithBlogs (GWB) url (mine is "geekswithblogs.net/geekusc... You will be given a chunk of code. Log into your GWB page, select Options | Configure At the bottom of the page (underneath where it says "Static News/Announcement") paste that code in. Go to a couple of your pages, use some of the navigation. Go back to google analytics and click check status. You should be set. Oh, and if you haven't checked the thirty ...
Resumen MSMQ is a component of Windows 2000, Windows XP, Windows Server 2003, and will be included in Windows Vista and future server versions of Windows. It allows cooperating applications to send and receive messages to each other—even if the intended recipient application is not running, or the computer on which the sender or recipient application is running is disconnected from the network. Messages are stored and forwarded by MSMQ until they reach the destination queue. A recipient application ...
Firebug adds a global variable named "console" to all web pages loaded in Firefox. This object contains many methods that allow you to write to the Firebug console to expose information that is flowing through your scripts. console.log(object[, object, ...]) Writes a message to the console. You may pass as many arguments as you'd like, and they will be joined together in a space-delimited line. The first argument to log may be a string containing printf-like string substitution patterns. For example: ...