Published by Mr Kirkland May 11th, 2008
in Uncategorized.
I’m officially rubbish at javascript. I just spent about an hour trying to figure out why my nice Jquery slideToggle/slideDown functions were making the browser jump up to the top of the page. I wouldn’t normally write a blog post to tell the world how shit I am, but I recon I’m not the only developer who having declared javascript the devils tool back around 2001, only to pick it up again recently with great enthusiasm after discovering one of the nice new javascript frameworks that have salvaged it from our bin, is still a bit shit at javascript.
The Problem
I too wanted to use the tasty slideToggle type function that everyone and their dog uses on their website now a days:
$(document).ready(function() {
$("#crap").click(function (){
$("#crapDiv").slideToggle();
});
});
Resize and Scroll you window down a litte then Click me
Hi I’m going to annoy you if you’ve scrolled the window down!
How crap is that! it make the browser jump back to the top of the screen.
Why the Problem
After poking around I realised the the browser is attemping to follow the link, and it’s something to do with this that’s causing the jump (hence the button example on the jquery site not being affected).
The Solution
return false:
$(document).ready(function() {
$("#good").click(function (){
$("#goodDiv").slideToggle();
return false;
});
});
Resize your browser scroll down and Click me
Hi I’m going play nice even if I’m below the fold etc.!
Ahh, lovely
Moral of the story
Errr, don’t be crap!
Published by Mr Kirkland December 6th, 2007
in Uncategorized and webmastering.
I’d hazzard a guess that there aren’t a great deal of non-japanese vi users on osx who need to work in japanese, but at the very least this will serve as a reminder for myself later on!
First up, the most useful resource I found was the following page http://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/vimjp.html (thanks to Taku Yamanaka!)
If you can read Japanese, then follow his instructions otherwise, the key steps are:
Setting up VIM
edit. you ~/.vimrc file and add:
:set enc=utf-8
:set fenc=utf-8
:set fencs=iso-2022-jp,euc-jp,cp932
Edit your terminal settings
- File -> Show Info (ファイル>æƒ…å ±ã‚’è¦‹ã‚‹)
- Go to Emulation (エミュレーション)
- uncheck Escape non-Ascii characters (éžAsciiæ–‡å—をエスケープã™ã‚‹)
- Go To Display (ディスプレイ)
- Check Wide glyphs count as 2 columns (ワイドグリフã¯ï¼’æ¡ã¨ã‚«ã‚¦ãƒ³ãƒˆã™ã‚‹) and Wide glyphs for Japanes/Chinese/etc.(日本語やä¸å›½èªžãªã©ã«ãƒ¯ã‚¤ãƒ‰ã‚°ãƒªãƒ•を使用ã™ã‚‹)
- You’ll probably want to make the settings default (è¨å®šã‚’デフォルトã¨ã—ã¦ä½¿ç”¨)
Bash
For good measure you might want to tweak bash. Edit ~/.profile and add:
export LC_CTYPE=en_US.UTF-8
Edit ~/.inputrc and add:
set input-meta on
set output-meta on
set convert-meta off
set meta-flag on
set output-meta on
You’ll need to reload bash for these changes to take affect - close and reopen terminal.
Published by Mr Kirkland July 11th, 2007
in Uncategorized.
Facebook have opened up their 24 million strong network to 3rd parties with a sturdy development platform which allows one to put applications inside facebook that users can install and interact with. On top of this facebook are giving complete freedom to developers to monetise this opportunity!
If you have a new idea or an existing website that you would like to turn into a facebook application then we can facilitate it’s development. We have extensive experience of the facebook API and what it can do for your application more over we have already deployed an application for the successful sentence game website inside facebook; you can see the application here (facebook registration required)
The Next Step
Please fill out our enquiry form with brief details of your project and budget allocated.
Useful links
Published by Mr Kirkland June 12th, 2007
in Uncategorized.
PHPAccounts has so far been tested on MySQL and Apache though other configurations may be possible - please report your successes and failures!
Required
- PHP 4.3 or greater
- MySQL 4 or greater
- Apache 1.3 or greater
Recommended
- ImageMagick is required for processing of images
- Ability to run a crontab is required for repeat invoicing and reminders
Published by Mr Kirkland June 12th, 2007
in Uncategorized.
This project now has a site of it’s own. Please Go to phpaccounts.com and download the open source package there.
Published by Mr Kirkland June 7th, 2007
in Uncategorized.
HBM is Happy British Man
A delightful series of inverted portrature
www.hbm.jp
Published by Mr Kirkland June 7th, 2007
in Uncategorized.
Web Based Databases And Applications
Running a business on the Internet can often mean running the business FROM the Internet. A great number of business already make use of the Internet’s potential, sales: booking flights, selling goods, selling software services: on line banking, data analysis publishing.
Behind the scenes, the integral part of this process is storing the information in a database and creating an “application” to use this database. Mr Kirkland special izes in web application and database design and has many clients whose businesses are running of applications crafted to their needs.
Whether you have an existing system that needs improving or you have yet to realize the potential of your business on line, Mr Kirkland would love to hear from you.
Published by Mr Kirkland June 6th, 2007
in Google and Uncategorized.
I often use the adwords keyword tool, to play around with keyword ideas both for adwords campaigns and general reasearch. However I’ve always had a suspicion that the results for search volume are subject to some sort of inaccuracy. Exactly why they should not be able to present accurate data I am unsure - it’s google’s own data after all!
In particular I noticed that for japanese keywords e.g. オフィスレンタル (office rental) that it also reported high volumes of traffic for the same words reversed レンタルオフィス (rental office), whereas intuatively I’d have thought the order of the words very important. Perhaps they need to be exact phrase matches i.e. enlosed in quotes, however the keyword tool doesn’t seem to allow this.
Anyway I’m not alone on this train of thought!
Published by Mr Kirkland June 5th, 2007
in Uncategorized.
新宿区æ±äº¬ shinjuku tokyo, directory of links for mobile users in shinjuku
www.shinjuku.mobi