Code Snippets for PHP, JavaScript and ILE

Yesterday we added a folder to the consulting SVN repository to store code snippets in (http://svn.excelsystems.com/svn/consulting/001 Code Snippets). There are already a few snippets in there. The purpose is of course easier sharing and accessibility to reusable code. And all the advantages of subversion, e.g. tracking changes.

Please feel free to add any of your code snippets to this folder and/or improve existing snippets.

The following scripts/functions/files are already there:

  • ILE
    • A search and replace function, that scans a text file for place holders and replaces those with any text. WebSmart 8.8 required with local variables and function parameters enabled.
  • JavaScript
    • A print_r/var_dump function that I found on a website. It’s similar to PHPs print_r/var_dump
    • jQuery Plugins: autoSubmit and elapsedTime. I wrote these two scripts. The autoSubmit plugin submits a form when a maximum defined number of characters is reached. The elapsed Time outputs a simple timer, I found the plugins out there too complicated for what I wanted to do. The autosubmit is used for two touch screen applications that we developed, Skechers and Cleveland Gear.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>