ExpatTech is currently short-staffed due to increased corporate on-site work, and our office will often be closed. Please call +36705578849 to arrange an appointment time!

ExpatTech Techblog - ribanc

Nagy Richárd 2009.06.11. 15:30

Removing default image drag behaviour

In newer browsers, when you start dragging an image, a default behaviour is triggered, so you can drag the image ex. to the desktop or whereever you want. Firefox, Opera, and Chrome does this, and also Internet Explorer 8. As anyone could guess, problems start with the latter.

I wanted to create a solution where the user can drag and drop objects around, and of course in this case it is not allright when the browser overrides my event handlers with its default one.

In standards-compliant browsers the solution is easy, the Event object has a method called preventDefault(), and when you call it in the 'onmousedown' event handler, this default behaviour is cancelled. I was not really surprised when it was only IE8 where it did not work. Well, in IE the Event object has no preventDefault() method, IE uses a boolean property called returnValue. I tried that one, nothing changed.

I spent some time googling about this, no results. Then in MSDN I found out that IE has a special event, called 'ondragstart' , and I already knew that this is the solution (Safari seems to support this event too). So in an 'ondragstart' event handler you have to set returnValue to false, and you are done.

Nagy Richárd 2008.11.10. 13:07

It's the power button...

Sometimes I also do some computer repair, and I was asked to deal with a computer that does not work at all. It did not power up. First I tested the power supply, it was perfect. I disconnected everything from the motherboard, leaving only the processor and the RAMs. Nothing.

So I decided it must be the motherboard. But then I had a strange feeling, that I should test the power button. I tried it, just for fun. I disconnected the cable of the power button from the motherboard and used the good old screwdriver trick to start up the computer. It worked. Ribanc.

Dylan Cooper 2008.10.28. 22:31

Installing Windows XP on a Vista machine

Now, would you call that a DOWNGRADE? Popular opinion says no, as it seems a majority of computer users prefer the XP platform to Microsoft's latest version of Windows, Vista. The reason is that to date XP has been the most stable of all the Windows OS releases, having the greatest amount of compatibility with a wide variety of software. And it also afforded you a modicum of control over the settings and operation of your computer, unlike Vista that hides everything behind it's "user-friendly interface" and flashy buttons.

So it's no wonder that a lot of people who have purchased new computers and been "force-fed" Vista as their operating system are choosing to switch back to the familiar and relatively easy to use Windows XP.

Depending on your particular model of computer, and in particular laptop, this may not quite be as simple an operation as you may think. Getting anything running on a computer is always a complex marriage between hardware and software and various settings in the BIOS, and this case is no exception.

Nagy Richárd 2008.10.28. 18:38

Setting up a VPN

In the office, we have a LAN behind a router. On the LAN there is a fileserver which hosts personal and project files which are to be shared and/or backed up. This fileserver runs Windows XP. We have employees who live in other cities and work from there, and we also wanted to be able to access shared files from home, so we decided to set up a VPN (Virtual Private Network). This basically means that from the Internet we can connect to our LAN and use its resources through a private and secure channel.

I became the lucky person to be selected for this special quest. I expected it to be easy, but this was not the case.