Tag Archives: jQuery

Javascript Copy to Clipboard for Excel

I recently had a requirement to “export” data shown in a table on a web page to an Excel file.  In a normal situation I’d do something server-side to generate an Excel file with the necessary data, but unfortunately this situation was not a normal. The project I was working on did not have a server-side component – it was completely client-side code – so I couldn’t just create an Excel file.  The solution I came up with was to provide a way for the users to copy the required data to their clipboard and they could then paste it into an Excel document. Read more

Javascript Bug in Mozilla Firefox

Mike BerrymanI recently ran into an issue with a javascript element appearing incorrectly in Firefox. If you don’t know, in javascript you’re able to define a function after the line number that you actually call it in the code. This is possible because the browser (whichever that browser may be) will parse through the javascript before running any of it. This is to ensure that syntax is valid, memory is properly allocated, and the browser properly understands the function you declare so it knows what to do when the function is called.

HOWEVER, if you have a function declaration within an if block, AND said declaration occurs after you try to use it, Firefox won’t understand the function and throw an error.

Read more

Utilize flowjs as an Angular Directive

Mike BerrymanI’ve been working on an angular project that has a requirement to allow users to upload documents, pictures and videos to the site.  As a part of the upload process, after the user has selected their file, but before it’s actually uploaded to the server, the user needs to supply some metadata about the file.  Being a responsive, highly stylized site, the client didn’t want the standard input control with type=”file”. Instead they wanted the user to click an “Add file”-type button that would pop up the explorer window for the user to pick a file, and then once the file is picked, prompt the user for the required metadata before performing the actual upload.

Read more

« Older Entries