Archive for December, 2008

Remove spaces from an input field with JavaScript

Wednesday, December 10th, 2008

This is a small snippet to remove the spaces from an input field using JavaScript. It can be useful when you want a value without spaces, or when you want to replace the spaces from the input field with other characters. The JavaScript code: function stripspaces(input) { input.value = input.value.replace(/\s/gi,""); ...

Copy from Firefox and paste into Excel

Wednesday, December 3rd, 2008

You've probably already noticed that if you try to copy a table from Firefox and paste into an Excel spreadsheet, using the classic methods the table formatting is not preserved, and the data from the table is copied into one cell from the Excel spreadsheet. The solution is to paste the ...