Skip to main content

Posts

Showing posts from October, 2009

Image links in IE8

While mocking up a design page for a colleague's website I came across a new browser behaviour in IE8. This was the first time I used IE8 as my main development browser, due to the fact that the PC was re-installed and high-priority updates were applied. Surprisingly Microsoft branded IE8 as a priority update. Anyway, back to what I was talking about, here's a sample: <a href="index.htm"><img src="logo2.jpg" alt="Logo" title="Logo" /></a> As you can tell, this is using an image for a link, where it behaves well in Chrome, Firefox and in the previous versions of IE (7 and older). But in IE8, this is not the case as the DOM does not treat the image as innerText, only as a child node. As a result, everytime I hover the mouse over this image, an extra gap would come from nowhere shifting any relatively positioned elements. To fix this I explicitly added a space (&nbsp;), so the line would look like: <a href="inde

SQL Replace

A colleague recently asked me if it was possible to replace a string in SQL. After a bit of questioning, this is because entities like & in HTML would be encoded to &amp; in his database. Since it was the case of outputting information from a SQL statement, this can be simply done by using the REPLACE function in the SELECT . For example: SELECT REPLACE(CompanyName, '&amp;', '&') FROM Company The same concept applies in Crystal Reports.

Remote Desktop Copy & Paste

Here's a little tidbit. When I used to Remote Desktop onto client machines, they would disable file transfers as part of their security procedures. One way of transferring files in Remote Desktop is to allow the remote session use your local drives, so you can still navigate your computer from within the session, which is quite slow. Then you would have the ability of using the clipboard to copy & paste content from one file into another. But if you want to copy and paste files themselves, this is possible by enabling both of the above. It is a bit slow but it is more convenient and quicker then trawling your local drives slowly to find the file only to face a slow drag and drop procedure.