|
Simple JQuery method of intercepting a hyperlink |
Ever wanted to run a custom routine (like validation) on a template when a user clicks a link to proceed to the next step? I recently worked on a checkout template that was not a form, but still needed some validation installed when a user clicked the 'proceed' option. The code below shows a very simple way of using a JQuery selector to intercept the href click event and replace it with a custom function. My example shows a 'warning' div, and then returns false, IE does not action the click URL request.
2$(document).ready(function(){
3$("#element").click(function() {
4// Do some custom validation - show a div
5$(".warning").show();
6
7// disable the click
8return false; });
9});
10</script>
11
12<a href="" id="element">proceed</a>
|
Streaming media to Xbox 360's and PS3's using Twonky Media Suite |
I run a windows server 2003 pc at home, server 2003 is a great little web server that can handle multiple roles, including file storage. Unfortunately it is not Upnp (universal Plug and Play) so will not stream media directly to media players like Xbox 360 consoles, and the Playstation 3.
The traditional (and recommended) solution to this is to stream the media through another more modern operating system that has upnp / dnla connections that reside in Windows Media player. This can restrict where you store files on a network, I for one do not want to store media on a desktop machine that I rebuild every 4-6 months.
Another solution to this is to use a software application that acts as a translation layer. There are a few around, but the one I've been testing out recently is the Twonky Media Suite. It installs as a software service, and sits quietly in the background and serves up any media requests that hit it. It also appears on the network as a Upnp device, so it will be found by media players, and consoles.
http://twonkymedia.com/products/twonkymanager/default.aspx
Simply install the trial version, in the setup manager point to your media directories, and then fire up your media player. It will find it and allow you to browse through the different media types, completely bypassing the need for windows media center connections, or operating systems that are a little too old to know about Upnp or dnla.
|
Cookies in ColdFusion - cfcookie or cfset? |
ColdFusion can create, edit and delete cookies quite easily, but what are the functional differences in how you create them? Is one way better than another?
|
Jquery Rounded Corners Plugin Example - cross browser CSS replacement |
This article deals with a JQuery plugin that can emulate a totally cross browser CSS3 rounded corners solution.
There is an example of the finished code here: JQuery Rounded Corners example