Tag | Javascript Posts

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: ...
Network Monitoring Your web app on the server has plenty of tools and ways to measure performance, as well as tools like SQL-Server Profiler for SQL databases. But how do you trace, track and debug client-side code interactively? The use of alerts has been useful but does not support an interactive way for you to interact with the web-page on the fly. To make matters worse, even if you place some traces into your js code to help find the slow functions, etc, network latency may be another cause of ...
I wanted to display Boolean data in a Gridview and didn't like that disabled checkbox look. After searching online, I found some people solved this with Javascript, including the MS AJAX extentions toolkit which has an extender - but I didn't want to have a lot of checkboxes in my html that got replaced on the client's side with javascript that had to loop over them all. I just wanted the images. The quick-and-dirty way to solve this would have been to create a template column for my Gridview with ...
June 29, 2009 --- Introduction Good afternoon. My name is Andrew Brust. I am the Chief, New Technology at twentysix New York, a consultancy specializing in application development, business intelligence and other software technologies. I am also a native New Yorker and former technology professional with the City of New York. In the mid and late 1980s, I was a programmer for the Department of Parks and Recreation and later I was the Computer Systems Director at the Department of Cultural Affairs. ...
I was going to put this on twitter but it’s a bit longer to tweet. Last week I shared some videos on Google Reader and twitter from Microsoft’s MSDN Chopsticks video website. If you don’t know it, it’s a VERY nice videos website with much content on very interesting topics and very recent products as well as different experience levels of content. http://www.microsoft.com/be... Today, some other friends on twitter noticed the Chopsticks site and were wondering why it doesn’t allow ...
How to quickly collapse all nodes in the Solution Explorer (To my knowledge, this works with Visual Studio 2005 as well as Visual Studio 2008): 1. Create a macro (code taken from Jay Harris's blog. Update: I cannot find that post anymore. Good thing I copied it here!) Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports System.Diagnostics Public Module CollapseAll Sub CollapseAll() ' Get the the Solution Explorer tree Dim UIHSolutionExplorer As UIHierarchy UIHSolutionExplorer = ...
A great article, albeit in Hebrew, explains How to align RTL (Right-to-left) ASP.Net 2.0 Menu with CSS Control Adapters. Note, in particular, this change: /* Tier 3+ */ .SimpleEntertainmentMenu ul.AspNet-Menu ul ul { top: -0.5em; left: 6em; } Changed to: /* Tier 3+ */ .SimpleEntertainmentMenu ul.AspNet-Menu ul ul { top: -0.5em; right: 6em; } ...
Normal 0 false false false EN-US X-NONE HE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-style-parent:""; line-height:115%; font-size:11.0pt;"Calibri",... mso-fareast-"Times New Roman";} I wanted to post back after an auto complete extender did its job. This was the first version (the auto complete extender showed student names). Server-side: protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (!Page.ClientScript.IsClien... ...
<Foreword>For those looking for help integrating the AJAXControlToolkit with SharePoint check out this post: Integrating ASP.NET AJAX with SharePoint</Foreword> I’ve never been one to use JavaScript that much in my web development, partially because I haven’t had much training with it and partially because I usually work on heavy server side web applications. My current work project was well suited for some of the AJAXControlToolkit controls so I’ve been trying out other controls in the ...
Summary: In this post we will discuss the tooling that is at our disposal and also some of the benefits or not so beneficial features it brings to the table. Content Introduction Tooling Benefits of using it Introduction ASP.NET MVC is Microsoft's way of getting on the MVC wagon. It offers a lot more control over the application you're building, no more WebControls ( personally I never and hope to never have to use it ), pure XHTML as W3C would have you doing anyways. At this moment, and I suspect ...
This is one way to have up/down or open/close arrows appear on an AJAX AccordionPane. First add a div and an img to the Header of the AccordionPane along with the title (the example uses ‘Add Widget’). <cc1:AccordionPane ID="apTest" runat="server" > <Header> <div id="div1" onclick="UpDownIcons('imgAc... Add Widget&nbsp;&nbsp;&... src="Images/arrow_down.ico" id="imgAcc" alt="expand" /> </div> </Header> Note the onclick function for the div, that ...
This example demonstrates on how to move items between two ListBox using JavaScript. Here are the code blocks below: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>ListBox Demo</title> <script type="text/javascript" language="javascript"> function AddItemInList(fromLeftToRight, isAll) { var list1 = document.getElementById('&l... ListBox1.ClientID %>'); var list2 = document.getElementById('&l... ListBox2.ClientID %>'); if(Boolean(fromLeftToRight) ...
In C# and Ruby we can use the Where() and Select() methods to select elements from a collection by testing each element with a predicate (method that returns a boolean). Unfortunately, javascript does not have this capability. Here is the code to add a where() method to the javascript array class...

Read the full article

 

There are times that we need to use the enter key instead of using the Tab key for moving the focus of the TextBox controls from one to another to perform rapid data entry in the page. This example shows on how to achieve that with the use of JavaScript. Here are the code blocks below: ASPX: <html xmlns="http://www.w3.org/19... > <head id="Head1" runat="server"> <title>Demo</title... </head> <script type="text/javascript" language="javascript"> function controlEnter ...
Flot is a pure Javascript plotting library for jQuery. It produces graphical plots of arbitrary datasets on-the-fly client-side. The focus is on simple usage (all settings are optional), attractive looks and interactive features like zooming and mouse tracking. The plugin is known to work with Internet Explorer 6/7/8, Firefox 2.x+, Safari 3.0+, Opera 9.5+ and Konqueror 4.x+. If you find a problem, please report it. Drawing is done with the canvas tag introduced by Safari and now available on all ...
Both Mobile Safari (in iPhone OS 3.0) and Google Android now both support getting the location of the current user. How cool is that. Finally mobile web-pages can be location aware. The user is prompted for whether they wish to enable this facility on a per site basis. Here’s the HTML/Javascript that does it all. <html> <head> <script> navigator.geolocation.getCu... noLocation); function foundLocation(position){ var lat = position.coords.latitude; var long ...
So, somehow within the past five years I’ve mapped out my life to lead to a point where I’m sitting here blogging on GeeksWithBlogs.net. I never would have guessed it…lol There’s no need for me to sweat it though. I’m a 23 year old IT college graduate that has a full time software development job, an amazing family, a loving girlfriend, and incredible friends. As one of my co-workers recently put it: “I’m livin’ the dream” :) I'm a former employee of iPay Technologies and currently work for Republic ...
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, June 30, 2009 9:00 - 10:00 A.M. Pacific time Add to Calendar Additional Time Zones: http://www.timeanddate.com/... ...
For anyone interested here are some Silverlight Project Samples (databinding, animation, hello world, plus wcf webservice): http://cid-8e2654c5f01e6069... Overall I had a pretty good time and it sounds like I projected pretty good. Some people said they could hear me in the hallway that's a good sign. I'll just keep on trying to project just as good each time. It was a pretty long weekend, but well worth meeting the people I did. I met so many and hung out ...
While building a new website I stumbled upon a problem with the ASP.NET Menu Control. In all browsers, except IE8 the control works just fine. But in IE8 the dynamic parts of the menu are generated as blanks. Some investigation on the net learned me that this in normal behaviour build into IE8 by Microsoft. (????) There seems to be a problem with compatibility. luckily the solution is fairly simple. just make sure that your page(s) get rendered in IE7 compatibility mode. To do this add the following ...