Small nit: you'll need to use parens to have that work correctly, like so:

var alwaysfind = (this.getElement('a') || defaultanchor).get('href');

Otherwise, if |this.getElement('a')| finds an element, you'll get the element, not its href.

or is there a shorter other way to do this.
var alwaysfindanhref = this.getElement("a") || defaultanchor.get("href");

--
Barry van Oudtshoorn
www.barryvan.com.au

Reply via email to