Home  RDF/RSS 1.0  RSS 0.92  RSS 2.0  Atom  Comments [RSS 2.0] 

[16-February-2006]

hoverSmack Context Menu

Filed under: Tech Tech — @ 20:59 EST

I’ve been fooling around with the hoverSmack technology developed for the forgetFoo.com web site.  I wanted to combine it with the context menu developed for the AlphaFilter site with the goal of adding the capability of selecting any text on the web site and popping up a context menu that allows you to search for images, video, news and general webbiness.  I had to glue a lot of things together and it certainly isn’t perfect, but it actually works.  Select some text on this site and use your right mouse button (if you have one) to pop up the menu.  Here’s some things to search for:

Monica Bellucci

kate moss

SI Swimsuit Edition

1 Comment »

  1. Stupid Firefox. Just so you know, when coding for Firefox and you want to get the selected text on the page…

    var txt = window.getSelection();
    alert(txt.length); // returns undefined because txt isn’t a string.

    What is it? A ham? Why, it’s the getSelection object!

    So, instead, must do this:
    var txt = new String(window.getSelection());
    alert(txt.length); // returns the length of the selected text

    I’ve seen some cases where people have coded this:
    var txt = window.getSelection()+”; //concatenate an empty string

    I think the “new String()” is a more elegant solution and you’ll at least know what you have.

    This should fix the hoverSmack context menu for Firefox and possibly Safari. It apparently doesn’t work in IE7 beta 2.

    Comment by Mick — — 17-February-2006 @ 13:45 EST

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.



Content © 2005-2006 Valence Band Productions | CSS | XHTML | Theme by H P Nadig and Weblogs.us