Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  152 Posts | 0 Stories | 2310 Comments | 653 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

Web Development, JavaScript & CSS

including client-side browser technologies
If your Silverlight app references services, the endpoints to these services are stored within a config file within the xap bundle - which is usually deployed as .xap file within the ClientBin dir of your web app. To change the end point urls:1) Rename the xap file (eg within E:\Demos\MySilverlightApp.W... to .zip. 2) Unzip it 3) Edit the ServiceReferences.ClientConfig file (to update the endpoint url) and save it.4) Recreate the zip file5) Rename the .zip file as .xap That's it...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

This error occurred on our TFS2008 build server which we had upgraded to cater for VS2010 projects (by installing VS2010 on the build server - see this article). Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\Vis... was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. However - although we had installed VS2010 on the build server - we had not installed...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

This is for TFS2008. This is based mainly on this article: http://blogs.msdn.com/b/jpr... But also had input from these: http://www.woodwardweb.com/... http://blogs.msdn.com/b/buc... http://blogs.msdn.com/b/jim... Also the following article discussing upgrading a...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

This error ("Failed to access IIS metabase") can occur when you try to access your WCF when you have added for hosting within IIS. To solve this problem do this: Reregister ASP.NET for IIS: Open an Visual Studio Command Prompt (or a regular command prompt and cd into the .Net dir - usually: C:\WINNT\Microsoft.NET\Fram... then type: aspnet_regiis -i When complete, from the same command prompt run: iisreset Verify your IIS virtual/app dir is setup correctly (uses .Net 2). If you don't...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

This post will explain how to do fading (fade out a layer) in Gimp. Assuming you have an image open... Add a new layer Draw the part you want faded Right click on the layer in the Layers panel/window and select 'Add Layer Mask', then click on Add on the Add Layer Mask dialog (making sure the default value of 'White (full opacity)' is selected). Select the Blend/Gradient tool and set the Gradient to 'FG to GB(RGB)' . On the layer click and drag a line where you want the gradient (fade) to start and...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

The following code shows you how you can make Silverlight controls/objects moveable by dragging them with the mouse. Page.cs: <UserControl x:Class="MovingObjs.Page" xmlns="http://schemas.micro... xmlns:x="http://schemas.mic... Width="400" Height="300"> <Canvas x:Name="LayoutRoot" Background="White"> <Border CornerRadius="10" x:Name="brdMovable" BorderBrush="Black" BorderThickness="2" Background="AntiqueWhite" Canvas.Top="100"...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

If a user, using Firefox 3, signs out of a web site and does not close the browser, anyone else using that browser subsequently can view the content of pages loaded by the previous user (eg in an internet cafe, or any place where workstations are shared eg universities) - exposing private/confidential data. This only affects HTTP post requests (not gets) and only Firefox version 3 - earlier versions (1.5, 2 etc), and IE, are not affected. The main points are: This is definately a bug: a violation...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

A couple of notes regarding absolute positioning in FF and IE... Specifying position values: IE allows you to omit the unit of measurement for Left and Top. It assumes pixels eg: obj.style.Left = 10; However FF requires that you specify the unit of measurement eg: obj.style.Left = "10px"; Using other elements parents to calculate your object's position: The scenario might be you have a div that you want to position over or by another object - but that object has no position values. In this case I...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

As text-align doesn't work I use a simple work around: .mydiv{ width: 100%; left: 50%; } It's not perfect - but very simple and easy to understand - and you can modify it to suit. Seems to work ok in IE 6 & FF 2.0. Here's another method (http://www.andybudd.com/ar... - but I found it not obvious/simple enough (expecially for others who may have to maintain the css down the track - KISS) HTH Tim...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Many web pages are not designed with any consideration for printing - this is one of those annoying things that one comes across more often than not. Here are a couple of simple ways to make sure your pages are printed in a formatted way: Use a specific print style sheet. This is the most common approach used on the web. The idea being you create another stylesheet that is specifically for formatting your web page(s) for printer output. There are many examples on the web of how to do CSS so I won't...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

As yet I don't have the answer to this problem - so any suggestions would be very much appreciated! I have a JS library with an object that loads xml from a specified URL and populates specified HTML elements with the data. This works fine. However recently I refactored the code that calls this library, to be more OO (to allow it to be more easily extended). Now the xml "load()" method raises the error "Access is denied" when loading from external urls. I've proved that the load library still works...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

When you install Firefox on windows, by default it does not install the DOM Inspector. To make sure it installs it, select Custom Install then select Web Developer Tools. If you already have FF installed you can install the DOM Inspector without having to reinstall FF: Run the FF installer - just so it unpacks the install without installing anything. Use file explorer to locate the C:\Documents and Settings\<username>\L... Settings\Temp dir. FF will have created a temp directory to unpacked...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I have the following scenario: .container{ text-align: center; border: solid 1px blue;}<div class=container><tabl... In IE (6) this displays as you would expect (with the table centered). However with Firefox (1.5) the table is left aligned. Apparently this is due to a bug with the way FF handles CSS. The workaround is to use this: text-align: -moz-center;instead of text-align: center; Don't ask me why "-moz-center"...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

To achieve the same results as a TD nowrap (<td nowrap="true">) using cascading style sheets, use the following: white-space: nowrap; This style attribute only applies at the TD element level ie needs to be applied to each TD, ie not the the TR or TBODY. If you're desparate to not apply it to each TD, then you can get away with only applying it to the TD's of the first row - but this is only effective if applied to the cells containing thelongest data (so IMHO is a half-baked approach - ie...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

This little gem comes to us courtesy of MS's IE, whereby it resets the connection and sets content-length to 0 (zero), even though there is data in the post request, when the keep-alive timeout expires. Fortunately this only occurs when using HTTPS, and apparently it's limited to a particular version of IE (although I'm not 100% convinced about this). This bug is documented very well here and by ibm here, and an typically difficult to understand MS solution here. Another solution I think may work...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

IE supports provides a half-baked implementation of the non-standard attribute 'disabled' on anchor tags (ie it changes it's color -even though it does not actually disable the anchor (if it has an href value). Firefox does not provide any support for it. To add full 'disable' functionality to both browsers there are a couple of work arounds (hacks): Override the onclick event of the anchor (to do nothing) and override the visual settings. or, more simply Add or remove the href attribute (both browsers...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

function getObjInnerText(obj){ if (document.all) { // IE; return obj.innerText; } else{ if (obj.text) { return obj.text; } else alert("Error: This application does not support your browser. Try again using IE or Firefox."); }}...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

To obtain an object or a 'all' collection of child objects somewhere in the DOM you can use something like this: var all, myObj; if (document.all) { // IE; all = document.all["myParentObj"]... myObj=document.all["myFormE... } else{ if(document.getElementById(... && document.getElementById("my... all = document.getElementById("my... myObj=document.getElementBy... } else alert("Error: This application does not...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati