I would like to create multiple instances of a rectangle with a text object inside.
When you click the rectangle, the event handler will display the value of the text displayed in the text object within the rectangle.
I plan to use that value later on.
So, if we have a rectangle, called "element", with an embedded text object called "text", and a click event handler
that uses alert() to display the text displayed in the text object, then with two instances of element:
element1 with text "Apple" - will display "Apple"
element2 with text "Pear" - will display "Pear"
Does anyone know how to do that?
Thanks.