[albatross-users] al-input type="image" with variable src

Andrew McNamara andrewm at object-craft.com.au
Wed Feb 25 09:38:15 EST 2004


>Im trying to make an array of graphic buttons, each clickable.
>(I dont care about the x,y coords of the click, I just want an
>
>The trouble is that the buttons src="" isnt constant, but rather needs
>to be dynamically generated.
>
><al-input type="image" src="foo(3,4)" name="button-at" value="3,4">
><al-input type="image" src="foo(3,5)" name="button-at" value="3,5">
><al-input type="image" src="foo(3,6)" name="button-at" value="3,6">
>                            ^^^^^^^^

This is something that albatross currently doesn't do, and it's been
annoying many of us for some time. The solution is to extend Albatross
to provide a mechanism to evaluate any attribute, so you could do
something like:

        <al-input type="image" al-src="foo(3,4)" />

Unfortunately, that doesn't help you. It doesn't help me, either -
I ran into exactly the same problem yesterday.

Note that you can't nest albatross tags (so Matt's suggestion won't work,
unfortunately).

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list