jQuery is so powerful and very flexible and usually makes so many complex takes so simple. Anything with a scrollbar and can be selected can be programatically scrolled to to the top. $(div).scrollTop(); Scrolling to top of browser window is as simple as: $(window).scrollTop(0);
“Thinking in C++, Section Edition, Volume One” (ISBN:978-0139798092) was written by Bruce Eckel. The book is quite large coming in around 800 pages and focus on making the transition from C to C++, and focusing on practical programming. I believe the book could be much shorter if Bruce had a lot less repetitive, and long…
jQuery is a really popular JavaScript library that helps really simplify manipulating HTML with JavaScript whether it be CSS, animations or even doing Ajax. I’ve been using jQuery since at least mid 2008 and have to say that I just love how much easier things are and not having to generally deal with the cross-browser…
In MODx, it is always preferable to link to another page using the document id instead of using the friendly alias because sometimes MODx Evolution has a package that is appearantly capable of using the alias instead of the document id to provide a working link to another page. The reason you shouldn’t use the…
Google SiteMap and the other web tools provides a way for the owner or webmaster of a site to easily submit all of the pages to Google and keep track of which ones are crawled and indexed. Wikipedia provides a much more detailed description which goes beyond the scope of this post. I didn’t want…
Assuming you have a basic knowledge of css and html putting a div in the horizontal center of a containing block isn’t too difficult. I’m going to center a div with only text, but the exact same css may be used for a div containing images,inputs, etc. I’m going to assume you are using html…
When I first tried MODx Revolution (which I did try before MODx Evolution) I found the documentation to be pretty good except about snippet syntax. The tag syntax has changed from MODx Evolution to MODx Revolution. [Wayfinder? &startId=`0`] has to changed to [[Wayfinder? &startId=`0`]] More information can now be found here for all of the…
Setting focus to the 1st field in jQuery is actually really simple: there are some plugins that also can do it automatically on each reload of a form. I usually just use the following code on any pages where there is a form. <script type=”text/javascript”> $(document).ready(function() { $(“input:text:visible:first”).focus(); }); </script> Hope this helps.
I haven’t been using MODx for very long, but I have worked with several other content management systems previously and experienced both the good and the bad with them. MODx appears to be a fairly simple MVC style content management system with a bit of a pluggable architecture. I haven’t written any plugins for MODx,…
Many more senior web developers can remember throwing tags all over the contents of websites and using tables for the presentation of content: these practices are said to be intrusive and a maintenance nightmare especially when the font colour should be pink instead of black on a header. Unobtrusive JavaScript is another best practice for…
Many junior PHP developers seem to feel that PHP objects and variables are retained between requests. In PHP4 and PHP5, no variables are retained outside of the contents of $_SESSION and other stores between requests.
“Code Craft” (ISBN: 1-59327-119-0) was written by Pete Goodliffe. The book is relevant to all developers: code is very language agnostic. Code Craft doesn’t just cover the design of the program, but also includes quite a bit of content on the process the program goes through “in the trenches.” The book does include some minor…
I have been trolling Craigslist and Kijiji lately in hopes of finding some additional freelance work to add to my portfolio before I become a full time freelancer/consultant. Read the advertisements has proven to be a terribly frustrating experience. Advertisers need to always remember that the more details they provide will lead to a much…
For the last couple of weeks, I have began playing around with Drupal because I’m so sick of fighting proprietary CMS. The proprietary CMS suffers from the vendor updating only updating the CMS when convenient for them and this ends up holding the purchaser hostage. Overall, I know that drupal has enough of the functionality that I need in modules and the core to significantly improve the efficiency of my programming and possibly offer a large learning opportunity on software architecture.
I’ve just really began to try and experiment with using Drupal, modules, and really starting to customize how things work. I have really been playing with open source Content Management Systems off and on over the years because I don’t feel that depending on proprietary CMS is the right approach and definitely rolling your own…
The biggest advantage of the change is being able to better take advantage of Microsoft SQL Server features that probably made you choose to use SQL Server in the first place.Making the change wasn’t overly difficult because I took time and wrote a simple Database Access Layer.
“The Passionate Programmer” is an excellent read and that I feel I have learned more about myself than I would have ever thought. I would never say that it is the next Code Complete or Code Craft, but it can definitely help you develop a meaningful career.