30 July 2004 16:46
Something that I’ve seen on other sites, particularly online SMS sending tools, is form textarea’s that have a little box telling you how many characters you’ve typed, or that you have left to enter.
It’s not that tricky to setup really. You need a form with a textarea, and a very simple Javascript function to count the code.
/* javascript function to update form field
* field form field that is being counted
* count form field that will show characters left
* maxchars maximum number of characters
*/
function characterCount(field, count, maxchars) {
if (field.value.length > maxchars) {
field.value = field.value.substring(
0, maxchars);
alert(
“Error:
- You are only allowed to enter up to “+maxchars+
” characters.”);
} else {
count.value = maxchars – field.value.length;
}
}
The textarea needs a couple of event handlers so it knows to do something:
<textarea name=“notes” cols=“40″ rows=“5″ wrap=“virtual” onKeyDown=“characterCount(this.form.notes,this.form.remaining,255);”
onKeyUp=“characterCount(this.form.notes,this.form.remaining,255);”>
</textarea>
The full code can be seen or you can view the demo.
Filed: Technology // Tagged: coldfusion //
30 July 2004 9:37
Picked up the link to this from Pete Freitag’s site. The article over on IBM’s site is really interesting, it details a site called blog-city which is running on some farily old hardware and with BlueDragon.
There’s some excellent links on Pete’s site and a good thing for visualising garbage collection.
Filed: Technology // Tagged: coldfusion, jvm, performance, tuning //
29 July 2004 19:44
Picked this album up on the way home from work today and it’s brilliant. Old skool summer hip hop. Read on for the full track list…
Filed: Entertainment // Tagged: music //
28 July 2004 11:35
Just looking around on Amazon and discovered a new Mr Scruff album coming out on September 13th. You can go and pre order if you like, I have.
Filed: Entertainment // Tagged: music //
27 July 2004 22:49
I’m in a pod mood. Here’s another one, this time it’ll get the latest 5 news headlines from the BBC News site.
- Quite easy this one, first goto BBC News and find the feed you want to use. The RSS links are at the bottom of the page.
- Create a file called bbc_news.cfm and put it in your {blogroot}/includes/pods that contains this code.
- Update your {blogroot}/tags/layout.cfm to include the new pod.
Your done. Easy as pie.
Revision 1 – Code changed 29/07/04 21:12, DTD hack removed as BBC altered the feed.
Filed: Technology // Tagged: blogcfc, coldfusion //
27 July 2004 22:12
One of the new things I’ve added to this blog is the “Archives By Month” pod. The blog uses Ray Camden’s Blog CFC. If you want to implement this pod please read on.
Filed: General //
27 July 2004 11:35
Very amusing site on preparing for emergencies.
Go see
Edit: Ok, so this spoof site caused a lot of fuss, but they’re going to do nothing. Fair play to the chap.
Filed: General //
27 July 2004 9:44
Blackstone, the next version of ColdFusion is well under development now and following on from Ben Forta’s tour many rumours and stuff came out. There is a page on Macromedia’s site with exactly what Ben actually said and what actually is happening.
The new features are looking good, the event gateway, reporting functionality and also the admin api look particularly of interest. The deployment abililty as well will be great for the product I think, and open a lot of new options.
Filed: General //
27 July 2004 9:26
The latest virus to infect the net, a variation of MyDoom was so severe that yesterday it took out Google, see the article on BBC News site. If you do nothing else today, update your virus definitions!
Filed: General //
26 July 2004 22:35
OK, for those of you not the UK, currently on Channel 4 is Big Brother 5. A reality TV show where the housemates are trapped in a house for 10 weeks with camera’s everywhere.
One of the housemates, Michelle, is a bunny boiler! She’s utterly mad. In The Sun today there is an article reporting how she’s tried to convince poor Stuart to go with her when he leaves the house and not see his family. She won’t leave him alone, she follows him, she’s all over him, she’s crazy!
As all housemates are up for eviction this week, it has to be Michelle that goes for Stuart’s sake and the fact she’s driving me up the wall!
Lock up your rabbits when she gets out!!!
So, here’s how to vote:
- Text MICHELLE to 84444
(25p plus your STD network rate)
- Call 09011 21 44 07
(calls cost 25p, mobile costs may vary)
- Hit your red button to vote on interactive TV (Sky, Freeview, Cable)
(votes cost 25p)
Filed: Entertainment // Tagged: tv //