Tag | Javascript Posts

I came across this posting on Ed Eliot's blog and had NO idea this existed but it made my life a lot easier. Full credit goes to him on this - the below is cut and pasted directly from his blog so I know where to find it in the future. The URL for this post on his blog is: http://www.ejeliot.com/blog/63 .box { background: #00f; /* all browsers including Mac IE */ *background: #f00; /* IE 7 and below */ _background: #f60; /* IE 6 and below */ padding: 7px; color: #fff;} I think it speaks for itself. ...
This post is a comment on JP's post on redability. JP asks what the community thinks about the readability of this piece of code: Run.the<wire_up_global_e... .then<initialize_the_con... .then<initialize_the_use... .then<initialize_the_ui_... .then<initialize_the_mai... .execute(); My first feelings: only JP writes like this ;-) After reading it with full attention, I realize it clearly ...
Silverlight makes working with videos pretty straight forward, Microsoft makes Silverlight pretty straight forward with ASP.net and sharepoint is written in ASP.net, so match made in tech heaven!! I wanted a video player web part for sharepoint, that had some simple functionality like play, pause and volume. I started with expression encoder which output a nice media player interface...this is OK, but has a couple of restrictions; 1, its far to rich for what I wanted, animations all over the place ...
Jax CodeCamp crew did an amazing job turning around and getting a new venue last minute due to Fay and still holding a great event. Here is my PPT from the Jax CodeCamp [http://www.jaxcodecamp.com/ ]: "Windows Mobile, SQL Compact and other fun" Nikita Polyakov PPT: http://cid-153154d6f7d12177... Note: There is no code in the PPT. Watch How to Videos for getting started. WM How Do I Vides - http://msdn.microsoft.com/e... I picked ...
Code Camp 10 in Boston is around 4 weeks away and there's still room if you want to attend or if you want to speak. Check out Chris Bowen's blog for complete details or just head over to the web site to register. I have several sessions already planned. See you there ...
Ok, imagine the following situation: You are a developer and you want to keep up with the latest technology, so you update Visual Studio 2008 with Service Pack 1, installing .NET 3.5 Service Pack 1 as part of the update. You then proceed to continue with your ASP.NET application, building a nice neat AJAXy application. Everything works fine on your box, it's awesome, the in-your-cube demos go great, everybody's happy. So you build and deploy your new hotness then sit back and wait for the pats on ...
I haven't been to a PDC since 1997. The big announcement that year was 'ActiveX'. It was a great event and I have high hopes for this years event as well. This year the topic seems to be 'cloud computing'. I'm going to enjoy steeping myself into this technology. I just found out that Don Box is now going to be part of the keynote as well. It's sure to be a great time and there'll be more reports here ...
When designing a page in a web application, I have found that a page is more intuitive for end users if the page has a clear "Edit Mode" and "Read-Only Mode". With this design, the default mode of the screen is Read-Only, and the user clicks an Edit button to make the fields editable. The user then edits values as desired, clicks a Save button to save the values, and if everything saves properly, a success message is displayed along with the page in Read-Only Mode once again. I have seen a number ...
When trying to debug javascript using Visual Studio 2008 there a couple of things you need to do first - otherwise it (debugging) will not work and you'll get the following error when you hover over breakpoint in your javascript: The breakpoint will not currently be hit. No symbols have been loaded for this document. Note that this is only for debugging using IE (6) - not sure about other browsers/versions. Within IE go into Tools - Internet Options - Advanced tab and make sure the 'Disable Script ...
The Sins of Our Education System As we all know, Agilists tend to frown on specialization. I am no exception. I tend to think that I take that sentiment a bit further though. I believe that designers should program and that programmers should draw wireframes. Before you dismiss me out of hand as a crackpot, hear me out. Hopefully by now, most UX designers (and hopefully some developers) have read The Design of Everyday Things. Hopefully those same designers have accepted that their difficulty with ...
MS VS Dataset Designer allows to create a relationship (a DataRelation object) that maintains information about parent-child records in two data tables in a dataset using Relation Dialog Box. It has option to specify type of relationship: Both Relation and Foreign Key Constraint Creates both a relation and foreign key constraint (see below for descriptions). Foreign Key Constraint Only A ForeignKeyConstraint restricts the action performed when a value in a column (or columns) is either deleted or ...
I wanted to implement client javascript to re-calculate summary based on a few options(in drop-down lists) selected by the user . The closest JS sample I found was Complex Client-Side Shopping Cart .But it wasn't exactly what I wanted. I created an array of custom class objects. Class has InitialPrice and SelectedPrice properties as well as this.Diff = function( ) { return this.SelectedPrice-this.Ini... } Each DropDownList calls onchange Event Handler, which updates SelectedPrice value and ...
Update: deadline pushed back (another week?) for the scripting contest. In case you missed it, the guys over at the PowerScripting Podcast are hosting a scripting contest. Hurry though, the deadline is Sunday! They’re giving away free licenses of NetCmdlets and PrimalScript 2007. Technorati Tags: PowerShell, NetCmdlets ...
Phil just announced that Subtext 2.0 is finally out. I haven’t been very active on this release (sorry guys!) but with the plans for 3.0 starting up I will be getting back into things a bit more. The new 2.0 release looks really good and includes some new features and bug fixes that will be nice to have. Now, we just need to convince Jeff and company to upgrade. Some of the improvements are: Enhanced MetaWeblog and WordPress API implementations New CSS-based admin section The ability to set a separate ...
Mark Monster on DynamicProxy and Function Pointers, Emil Stoychev with OlympicShow, Denislav Savkov with weather forecast control, Azret Botash with a MessageBox dialog, Rich Griffin with a Tag Cloud and Dependency Injection, Rob Houweling with SharpZipLib, Alex Golesh on dynamic creation/destroying SL objects, Mario Meir-Huber with a SL blog in German, and James Bacon on Downloading SL errors. I'm back from vacation... no trout, but lots of fish and cool air. This first SC Blog post after vacation ...
I have just heard about a new search engine in town - Cuil. Apparently it pronounces "cool". Immediately I rushed to try it out. I can tell it is worth experimenting with, although the results returned were less relevant than using Google. So Google is a king to me still, but all in all the visual appearance is more appealing to me so I added this engine to my search engines array inside the IE that immediately hang and FireFox 3 that survived this brutality. Anybody up to improving ones searchs ...
Invoking web methods from client scripts is fun. But before you roll out your cool applications into the production, please don't forget to reconfigure the max JSON string length, represented by either the maxJsonLength value in the web configuration file or the MaxJsonLength property of the JavaScriptSerializer class. The maximum length of JSON strings, by default is 2097152 characters, which is equivalent to 4 MB of Unicode string data. This should be good enough for most of the web applications. ...
A solution to the EmptyDataTemplate problem: how to insert via GridView when table is empty. This is Oracle-based and does not use a SqlDataSource. If you have worked with the GridView feature for any length of time, then you probably have had to address the "EmptyDataTemplate" situation, where there are no records in the table from which you are pulling. Here is a sample screen shot of the typical solution when the table is empty. This solution will work, although it is not too elegant. Also, it ...
Okay...so, the post yesterday was clearly not as researched as it should have been. It's true...the Click() event does NOT work in FF...so, the solution I had to utilize the click event had a rather short lifespan. I tried to dynamically add the __onPostBack javascript event onKeyPress as well as onkeydown - to no avail. I'm not sure why it wouldn't work...but, it just wouldn't. (I'm using an image button, .NET 3.5, a lot of JS & AJAX on the page - not sure what, if any of that muddies the waters) ...
OK, I have heard you loud and clear, the comments suck in SubText and on Geekswithblogs.net. I agree, but I don't have near as many problems with people being able to comment as others do. This leads me to believe the problems lay in two places, the skins or the custom HTML code fields. Most of the time when I am debugging a blogger with comment problems they are due to some javascript they have embedded into the news section of their blog. However, this is a problem so we need to get it fixed so ...
UPDATE: If you're looking for the solution that will work in FireFox & IE...Go here Okay, I admit, this is yet another post so I know where to go in 3 months when I totally forget this day. Long story short: I was trying to use the DefaultButton property on a panel in order to get a button clicked by default when a user hits enter on my search form. I was using an ImageButton, and surprise! That won't freakin' work! Seriously...try it. I came across a post on here ( http://bytes.com/forum/thre... ...
Dependency Injection I have recently caught up to date with common patterns and practices today. One I was looking at was Dependency Injection. Simply put, it's amazing. I can not think of a single better way to make your code maintainable. I recommend that everyone who hasn't yet had time to tinker with it download a toolkit and see what it can do for you. I then started thinking about the practical implications of dependancy injection. Sure, it's great for creating objects with static operations ...
You can definitely find this information elsewhere But...I'm going to put it here right so I know where to go next time :) I have/had a situation where I had a modal control on my master page - it's what I'm using for a user to log into my application. I have many pages that need to call this - but I needed a way to call the show() method on my modal pop-up, from javascript. Here is the solution... var modalOnmaster = $find("ctlModalPopupBehavio... modalOnmaster.show(); Thank you Brett ...
Hi, I started proper programming with Java in 2001 and since then I was knew that Java is a language that has "Pass by value" for primitives and "Pass by reference" for the non-primitive types. I left programming in Java in 2004 and started using C#. Since last few months again I started part time development in J2ME and last week I came across a very interesting thing. I was sending a byte array as a parameter to a method and expecting to get the same parameter as an initialized array but I don't ...
Mark Monster on Mocking SL and Networking, Denislav Savkov inheriting from ItemsControl, Alex Golesh on SL Events in JS and vice verse, Edward Silverton with a SL Portfolio site, Dave Relyea on Templating, Page Brooks Controlling his Treadmill, Lee on TabStrip and vertical text, Robby Ingebretsen surveying SL and 3D, Expression Team Blog with Resource links, and Jesse Liberty with four Twitter Blogs. Congratulations To The Winners of Silverlight 2 “Write and Win” Contest ... Somewhere along the line, ...
I love standards -- a lot. I can't even tell you how much I love standards. I sing the joys of standards every day that I'm allowed to use them. Wait-- what was that? Allowed to use them? Sadly, its true. In some of the systems I work on the only way to make a system work is to make it work in an unsupported way. quirks in IE frequently don't help that process. So I'm going to talk a little bit about standards now, specifically as they pertain to the html tag <button>. A friend of mine was ...
There are many areas where optimization may occur, and the resulting solution may be different for different areas of concern. In an ASP.NET application, delay may occur in the following places: On the client (within Javascript) Along the network between the client and the web server (lots of information on the page getting submitted, in ViewState or otherwise) On the web server during processing and/or rendering On any other application servers during processing Along the network between the web/app ...
I've alluded in the past that I got my start in computers because of games; I also ended up getting started in programming because of games. I happen to be a big fan of the WarCraft and StarCraft series produced by Blizzard Entertainment, and it was my association with (and desire to make a good website for!) a group of people on their gaming service called Battle.net that got me involved with programming, and that's where the "Fun" part of this comes from. I'm not sure where "Profit" comes into ...
So I stumbled upon a cool new utility for web testing called Browser Shots. Browser shots will provide screen shots of the URL you send it in many different browsers. The full list of browsers can be seen here: As you can see from the image, you have the ability to select from multiple OS's and their browsers as well as set the Screen Size, Color Depth, whether Javascript is off or on, whether Java is off or on, and whether Flash is installed. This application is free, however you do have to wait ...
Hi, I was looking a simple way to be able to encrypt and decrypt my Connection Strings. I searched in the net but all i could find was Encrypting and decrypting Connection Strings using aspnet_regiis utility or by creating custom Encryption and decryption classes. Finally I could a very good way to do encryption and decryption using .NET class library. You can find the video of the tutorial in asp.net , Videos section (Video is called ASP.NET Tips and Tricks) or read it HERE . I am placing a sample ...
As with most spatial operation, every ESRI - ArcGIS / Mapobjects developer or end user in the GIS world prefer a spatial selection by drawing a rectangle or a polygon. Off-course its easy with desktop application, Try that with a javascript, its different challenge. I have started working on a Virtual Earth with MOSS project recently and I must say Iam definetly impressed compared to Google earth / Google Maps. I will post another article shortly after this on comparing the two products and my preference ...
Hi, After spending few years in IT I learned that we can find a lot of coders to code in projects but what we cannot find is GOOD CODER. By Good coder I mean someone who has good understanding of the problem in hand and can file a solution for it based on the best possible way. Further who can code based on standards and keep in mind best practices. I have been using FXCop for a long time and I love using it in my projects. Yesterday I came to see something new (for me) called StyleCop. I liked the ...
Found a great resource today in SpringWidgets.com. The website allows you to pretty easily create, distribute, and track your own countdown and feed banners. Take a look at the widgets I created in about 20 minutes here. While there are many other banner automation wizards on the web, SprngWidgets does an exemplary job at making the distribution process a breeze. Whether you want the widgets integrated into Facebook, MySpace, Blogger, Mac Dashboard, or you just want the HTML or Javascript code to ...
I found a new Twitter toy today. It is called TweetMyPage. It is not an application that needs an installer. You setup your settings and TweetMyPage gives you a javascript you add to your bookmarks. When you are reading a page you want to Twitter, you click on your TweetMyPage bookmark and it will ask you for your Twitter user id and password. Once you give it your credentials it will tweet a message similar to the following: Reading (http://linktoarticle) title of article. Currently TweetMyPage ...
Software development satire

In software development, communication is key. Here's a popular email forward describing the reality of software development and the miscommunication prevalent.
I've tried using FCKEditor 2.6.2 for an ASP.NET web application I was working on and it's really cool. You can check out a demo of the editor here: http://www.fckeditor.net/demo Unlike the version of FCKEditor on GWB (GeeksWithBlogs.com), we don't have a separate popup browser window. A common problem on GWB's FCKEditor is when you're done using the popup browser window, it doesn't automatically close. The new version certainly ranks higher on user-friendliness ...
For those of you who don't have access to IE or FF dev toolbars - this is how we used to do client side runtime debugging... Drop the following code into your web page (preferrably at the bottom): <script> function log(text){ document.getElementById("lo... = text; } function dump(){ log(document.body.innerHTML); } function logProps(obj){ var msg = ""; for(var i=0;i<obj.attributes.len... { msg+=obj.attributes[i].node... + ": " + obj.attributes[i].nodeValue + "\r\n"; } log(msg); ...
For some reason some controls/tags within ASP.NET do not always get rendered/passed to the client. This has happened to me on a number of occasions. It seems limited to <style> and <script> tags - but happens for both raw HTML (within the aspx designer) and dynamically created tags (eg using new HtmlGenericControl("style")... This is happening to controls/tags within AJAX updatepanels within, webforms and usercontrols. Sometimes I can work around this by simply placing these controls/tags ...
I found a new video showing AJAX (Ajax.NET Professional), JavaScript and jQuery. On the Web server they are using ASP.NET. (Note: you need Silverlight for the video player) Download video as WMV ...
Martin Mihaylov on the MultiscaleImage control, Tamir Khason on Visual Tree and thickness, Mike Snow on SL and JS, Donavon West on DeepZoom Obama, Video Player by David, Jesse Liberty's Styles and Templates Tutorial is Up, Frank LaVigne on Swift3D and SL, and Andy Beaulieu resolving Default.aspx being executed. From SilverlightCream.com: Tip: Maximal and minimal zoom level in the MultiscaleImage control Martin Mihaylov resolves a problem I've noticed in DZ apps ... that you either zoom the image ...
What we need in ASP.NET is a change-tracking control. Whenever we modify elements on a form, it would be a good idea to display a popup for user confirmation before navigating away from the page. Right now, I've got some pretty ugly Javascript doing this.

The next version of the AJAX Control Toolkit would really kick a** if it had this control. It could also include bug fixes for the 'focus' issue with the RoundedControlExtender and TextBoxWatermarkExtender.
The following javascript error occurs when trying to use the Telerik controls and you haven't updated your ASP.NET (2.0) web.config file correctly. Error: 'Telerik' is undefined To fix make sure the following lines are within the <system.web> section of your web.config file: <httpHandlers> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.S... System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad36... validate="false" ...
A search comparing the StringCollection to the ArrayList may give you articles that say "the ArrayList works better than the StringCollection" but what you need to know is that a StringCollection is simply extra methods over an ArrayList - there is an actual ArrayList included as a private member within the StringCollection class and it caters to storage needs of StringCollection. In other words, the StringCollection is just a disguised ArrayList! You don't really have to decide between using an ...
I am by no means a search guru, but at work they have tasked me with creating custom search scopes. What they want is the ability to search a bunch of document libraries of a specific name in bunch of office sites. John Ferringer gave me this awesome link: http://blogs.microsoft.co.i... I figured that I could somehow use it to create custom scopes for the document libraries. I started playing around and ...
I've been running a couple of tests on the ArrayList and the StringCollection in .NET 3.5 to determine if the ArrayList still performs better than the StringCollection for insertions. There are a couple of articles on it, this one from 2004 being the one that also presents source code for a simple test that they've performed: http://weblogs.asp.net/just... Initially, I went with a normal-looking test but without creating the string table and that skewed the results. ...
UPDATE: The component controller was removed from the MVC framework before the RTM release. For an updated version of this post, click here. At some point when creating a web app, you're going to want some reusable UI components. This might be because you want the same visual UI snippet repeated more than once on a single page or it might be because you want to use the same component on multiple pages. In a traditional ASP.NET web app, typically you would use a User Control for this type of thing. ...
Due to much frustration and lost time, I'll try to summarize in this post the "naming" conventions to be used when defining and/or referencing IDs (some of which are, in fact, GUIDs, and others contain GUIDs) in Sharepoint 2007. If you're thinking "what the heck?! aren't GUIDs always the same format?!" you're half-right: they should be, but not in sharepoint. So if you're a newbie to sharepoint 2007 (or wss 3.0) like me, the following tips regarding how element id's should be written might save you ...
For some reasons, it took me a few google search attempts to find the following tools: MSDN includes Workflow Monitor Sample -Windows executable to view details of tracked workflows. When downloaded, copy EXE to your bin directory when custom workflow DLLs are located. Ensure that tracking database doesn't have too many instances, to avoid timeouts. Jon Flanders put together the ASP.NET implementation of the Workflow Monitor SDK sample. MSDN Tracking Samples mostly described how to store tracking ...
Visual Studio 2005 SP1 added in a couple of _designer:wfdid attributes into some of my ASP.NET tags and they prevent the project from compiling. Apparently, there's a bug somewhere that didn't get fixed with the service pack.

Removing the attribute fixed the compilation error.
Since the downtime at GWB, I've been cooking up content that has been going onto my BlogSpot mirror and I've been too lazy to paste them all here one-at-a-time so here are the links: Model View Controller (MVC) Design Pattern http://knitinr.blogspot.com... Yet Another Twitter-Cline: Identi.ca launched http://knitinr.blogspot.com... Error Pages: ReddIt and Acromedia http://knitinr.blogspot.com... ...