Live Mocha Learn a language, teach a language. This looks like a pretty useful tool. I’ve always thought that language lessons should give “points” for completing lessons, like a game. People need some extra motivation to learn languages…

Goal For It Create and track life goals. You can’t reach your goals unless you write them down – this is where you can write them.

Tested in IE 8 and Firefox 3.6, this JavaScript will simulate a user clicking on a link.

<script language="JavaScript">
// Execute the called event
function fireEvent(obj,evt) {
    var fireOnThis = obj;
    if ( document.createEvent ) {
        var evObj = document.createEvent('MouseEvents');
        evObj.initEvent( evt, true, false );
        fireOnThis.dispatchEvent(evObj);
    } else if ( document.createEventObject ) {
        fireOnThis.fireEvent('on'+evt);
    }
}

</script>

Call it using

fireEvent(document.getElementById(‘idOfLink’), ‘click’);

where “idOfLink” is the name/ID of the link to be clicked. You can highlight from “Example” below down to the “Clear” link and click view source to see the code in action.

Example


    

Link one
Link two
Clear

© 2012 Stinky Cheese