SSbits - Home page
Site by Carbon Crayon
Submit a Post >
  • SnippetsInserting Javascript into a DOM Popup


    I recently ran into the problem of how to insert my own Javascript into a DOM (DataObjectManager) popup window.  After much googling and getting nowhere I resorted to reading the code and discovered that it was in fact quite simple to do.

    The problem I was trying to solve was for a dropdown select box to toggle fields in the form, depending on whether a link is internal or external to the site. 

    Continue reading...
  • SnippetsClearing the Search field on click with jQuery


    As with everything, it's attention to detail that makes great sites. One thing that really bugs me is when a site has a search box with the word 'search' inside it but which does not clear it self when clicked, meaning I have to clear it before I can search. Given it can be achieved with a few lines of jQuery, it's a real surprise how many sites fail to implement this, or that still use the 'onclick' inline javascript event. 

    Continue reading...
  • SnippetsDisable Default JavaScript Behaviours


    By default SilverStripe uses bulky and sometimes unwanted JavaScript libraries to handle form validation and AJAX page commenting features. Often you want to disable this behaviour so you can integrate your own JavaScript code. This is easily achieved with the following two lines in you site configuration file:

    Continue reading...


Site of the Month

Find SSbits on

Top Contributers

Rank Avatar Name
1 article image Aram Balakjian
2 article image wfacewomens
3 article image Daniel Hensby
4 article image Marcus Dalgren
5 article image ryduhartchas
6 article image Hamish Campbell
7 article image Ty Barho
8 article image Martijn van Nieuwenhoven
9 article image Darren-Lee
10 article image Roman Schmid

View full leaderboard