PDA

View Full Version : newB - another question: targeting windows or components?


esc_oblivion
04-28-2004, 09:29 AM
I looked through the documentation (of course) and didn't see what I think I'm looking for.

I'm looking for a means of identifying a window I create so that I can refer to it later on, or from other windows, etc. E.g. let's say that I have a link, or action/event possibility from another window that needs to cause the contents of a different window to change - or the window itself to change... how can I accomplish this?

All majorly dumbed-down-for-my-understanding-replies are mucho appreciated!

Thanks! Abe

antun
04-28-2004, 10:35 AM
The easiest way is to give it a name or an id (id's are global):


<canvas>
<window id="foo" />
<button onclick="foo.setAttribute( 'x', 200 )" />
</canvas>


-Antun

esc_oblivion
04-28-2004, 04:06 PM
That answers my question perfectly! Thank you!