[albatross-users] Question about Albatross tags and unknown attributes

Matt Goodall matt at pollenation.net
Fri Aug 8 22:59:22 EST 2003


Max Romantschuk wrote:

>I've been studying the documentation, and I started wondering something about
>Albatross tags... Do the tags pass through unknown attributes transparently?
>
Yes, all the tags provided by Albatross pass unknown attributes straight 
through. There is actually a helper method, Tag.write_attribs_except(), 
that does most of the work - makes writing your own custom tags even 
simpler :).

>I'm sure it says somewhere, but I didn't find the answer yet ;)
>
Hmm, I can't find it either.

>An example: Say I've got a form which needs a number between 1 and 10 in an
>input field. I could naturally do server side checking, but from an
>UI-perspective JavaScript-based client-side checking may often be better.
>
>I would then make suitable logic and put the checks in the form's
>onsubmit-handler. Would that work?
>
Yes, it should be fine. The names of the form and form elements would be 
as expected. Any attributes that install event handlers (onsubmit, 
onlick etc) would be passed through to the HTML unchanged.


Cheers, Matt

-- 
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenationinternet.com
e: matt at pollenation.net
t: +44 (0)113 2252500





More information about the Albatross-users mailing list