GMail Drive shell extension March 16, 2005

Posted by Slobodan Kovacevic in : Resources and Links , add a comment

When GMail appeared almost instantly there was a Linux program that enabled you to mount your GMail account as 1GB drive on your local system.

Today I stumbled upon same kind of program, but for Windows. If is called GMail Drive shell extension and it will make your GMail account act as ordinary storage medium. You can do all normal stuff, like drag&drop, copy, make folders…

Although this tool works perfectly author states that there are some limitations, as well that changes at GMail might either block use of this program or make it temporary “broken”.

Disable form submit on enter keypress March 13, 2005

Posted by Slobodan Kovacevic in : Programming , comments closed

I needed a JavaScript function that disables form submission when enter key is pressed. I’ve looked around and all solutions worked only in IE and I needed it to work in FireFox as well.

Finally after some more reading I found a solution how it can be done. Here is the function that I created:

<script language="JavaScript">
function disableEnterKey(e)
{
     var key;

     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox

     if(key == 13)
          return false;
     else
          return true;
}
</script>

All you need to do is to add onKeyPress event to, for example, text element and call this function. Something like this:

<input type=”text” name=”mytext” onKeyPress=”return disableEnterKey(event)”>