Home | Blog Roll |  Link Roll |  Colophon/About| |


Archive for October, 2008

a Week in LA

Thursday, October 23rd, 2008

During the Canadian Thanksgiving weekend, I was in Los Angeles taking advantage of visiting friends before they returned to Japan.  (thank you Hikaru & Mayuko!) It was a chance not only to hang out with them, but also see LA almost for the first time - if you don’t count when I went to the Disney and Knot’s Berry Farm theme parks when I was 12, and countless books/films/movies.

I have additional images in my flickr set and here are a few highlights :

santa monica pier
Early on we visited Santa Monica Pier, the original Muscle Beach, and walked the 3rd Street promenade.  Dinner was at Katana Robata & Sushi Bar to celebrate.

Manhattan Beach houses
Then we had did a long scenic drive though Manhattan Beach, down to Palos Verdes and Point Vicente then final over to the port of Los Angeles (huge!) and, in Long Beach, the Queen Mary passenger liner (interesting), the the excellent Aquarium of the Pacific (bioluminescent jellyfish, sharks and more!).    Dinner was at the excellent Antonio’s (7470 Melrose Ave ) : not fancy but large helpings of good Monterey and Mexico City food at reasonable prices.

We had lunch then next day at Torafuku (10914 W. Pico Blvd) : BEST JAPANESE FOOD EVER.  (consider use of blinking tag here…) The food -  grilled fish, “Kamado” cooked rice, etc - was amazing but at a fraction of the price i would expect to pay.  It was so good we talked about it for days and went back for a equally good dinner (including tofu I liked, and I don’t like tofu!) on our last night.  I we ever move to LA it will be because of this.
Torafuku grilled fish

That afternoon was all about the Getty : the J. Paul Getty Museum at the Getty Center, which is an amazing art collection in an amazing building, in a (yes) amazing setting. and it only cost $10 for parking!
getty

The next day was involved the Llttle Tokyo area in Los Angeles (including the best ramen at Daikokuya) getting lost in Beverly Hills and checking out Rodeo Drive (if you can’t tell that’s the Prada store you can’t afford it!) and having a sweet attack at Sprinkles Cupcakes (with it’s line up, it is still worth it!).
sprinkles outside

That night we ate Ethiopian at Meals By Genet in the near by little Ethiopian. It was friendly and good!

another day (and more food!) : checked out UCLA and IN-AND-OUT Burger (didn’t try the “secret menu”). Also went to the Los Angeles County Museum of Art (LACMA). A art collection as good as and as big as the Getty!! after five o’clock its “pay what you can” and they have a free Friday Night Jazz concert. We saw the a fraction of want they have but I recommend the “The Pavilion for Japanese Art”.

We ate Italian (Dolce at 8284 Melrose Ave), and despite being a celebrity restaurant the food and service is very good. You can also get the food for half price on Monday’s, but you need to reserve in advance.

Griffith Park Observatory 2
On our last day we went up to the Griffith Park Observatory, saw the show and then the sunset, then raced to Little Osaka, to visit the main Giant Robot store (this makes 3 in a year including San Fran and NYC), before going a few blocks away to that final dinner at Torafuku.
Giant Robot LA

All in all a very good time! (as can be told from the 5+ pounds I put on.) It’s a strange spread out city, with friendly people, good food, lots of art and culture and too many cars.  The weather was warm (33 degrees canadian or 91 degrees foreign-heit), and very very sunny.

A few things and place still to visit or revisit, but I got a good sense of LA and will be re-reading/viewing some favorite LA based stories to repaint those mental pictures.
panarama from Griffth south to La

Tab interface for static content using JavaScript Prototype

Thursday, October 9th, 2008

I wanted to make a simple as possible Tab interface, using the Prototype JavaScript library (version 1.6.0.3 in this case using the Goggle AJAX Libraries API).  Further adventures is modern javascripting….

Real world uses for this would include any time you have big long page with static chucks of text, or other content, that you want to reveal only  a bit at the time.   As demonstrated, here at tab.html, that content could be static text or images or html input fields.

The html for the Tabbed navigation is a unordered list (could be an ordered list) and anchor href links for the target id’s and text:

<ul class="TabNav" >
<li id="defaultTab"><a href="#SectionAA">A Section</a></li>
<li><a href="#SectionAnother">another Section</a></li>
<li><a href="#Section3">Section 3</a></li>
<li><a href="#Section4">Section 4</a></li>
</ul>

where the target of the a href (i.e. “#Section3″ i) referees to the id of the content you wish to make visible if prefixed with a pound hash (#), otherwise it acts just like a regular anchor link. (and external page links works as normal.)

I’m also assuming that the all the static content is nested under a parent tag (in this case a “div”) like this

<div>
<div id="SectionAA" >SectionAA content</div>
<div id="SectionAnother" >SectionAnother content </div>
<div id="Section3">section content </div>
<div id="Section4" >section content</div>
<div id="Section5" >section content</div>
</div>

the only configuration is done in the JavaScript file tab.js:

var navTabClass = 'TabNav';
var navTabSelectedClass = 'selectedTab';
var defaultTabId = 'defaultTab';

where 2 CSS style names are set and the default selected tab’s id is indicated.

Using the defaultTabId is optional, and if not used then the item (<li>) under the navTabClass list is used. no default demonstrates this, the JavaScript was nasty to figure out - get the element with the class and get it’s first child:

$$('.'+navTabClass).first().firstDescendant()

Notice that the url on the page is not being updated with the anchor name (i.e. http://www.falsepositives.com/web/tab/tab.html#Section3), since you are navigation within a page.  The default behavior can be restored by setting the variable preventDefaultEventonTabSelect to zero.  (and yes I could parse the starting url to see if a valid anchor name is supplied and use that to set the default tab, on startup.)

the trickiest part of the JavaScript is handling whether the Li is selected or “just” the text of the A link

if (elm.tagName == 'A' ) {
liElm = elm.parentNode;
aElm = elm ;
} else {
liElm = elm;
aElm = elm.firstDescendant();
}

The CSS styling of the page tab.css I’ve also left minimalist, but workable.

Also note that if javascript is disabled, then all content is visible, and the anchor links in the tags navigate you to that location as a proper default behavior.

enjoy…

minor update/fix : the direct links to the javascript and Cascading Style Sheets (CSS) files should now work. (”sorry about that chief…”)

JavaScript for a single element radio button list, revisited with Prototype

Thursday, October 2nd, 2008

Last year I posted JavaScript for a single element radio button list, referring to a issue I had with getting the value of generated radio button list. (All the standard solutions / samples that i found assumed the there are 2 or more choices.  And I had a case were an optional field might only have one value.  So I had to detect / trap and report on the value of this boundary case.)

I recently had reason to revisit my solution  and have since corrected two things.

In my original posting I had hard coded the name attribute of the radio button array.   Very bad,very lazy!That’s been rectified by passing the value of the name attribute into the function and using the forms element collection like this:

var ne = document.forms[0].elements[name];

Much better!

I also had cause to see if I could do better using the Prototype javascript framework? How about reducing 12 lines to 1 line like this :

selected = $$(’input:checked[name=”‘+name+’”]’).pluck(’value’);

You gotta like that!  (I’m also using the Google AJAX Libraries API to load the latest 1.6.0.3 release.)

As I mentioned in last years post all this also works for Check Box lists as well a Radio button lists.

I have a demo of this in serbl.html, showing the js running on a single radio button list, as well as a multi value radio button list and (because I don’t expect one to take my word) single check box button list, as well as a multi value check box button list.  The javascript functions used (getSelectedOW for OldWay, and getSelectedPW for Prototype Way) are in sebl.js

Enjoy.

TinEye Mobile : iPhone visual search for stuff

Wednesday, October 1st, 2008

as demonstrated during the recent The Amazon Web Services (AWS) StartUp event in Toronto by Idee’s CTO Paul Bloore,  TinEye Mobile is soon to be showing up in the iPhone App store to melt your brains… or just take an image of product (a CD, DVD, book or game etc.) and then send you on to read reviews, sample music or do price comparisons.

Leila Boujnane, Idee’s CEO, has a video showing off TinEye Mobile and Mathew Ingram writes Idee does visual search, iPhone-style, as does Jevon MacDonald (StartUp North) in Idee’s new iphone app - TinEye Music.

Let the melting begin….


Close
  • Social Web
  • E-mail
E-mail It