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

    5

    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

    4

    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

    0

    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...

Advertisement

Site of the Month

Find SSbits on

Top Contributers

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

View full leaderboard


Advertisement