Trevor, You can modify this example by just instantiating multiple instances of PhotoBox on the same page, each with a different variable name, and setting the
Message 1 of 2
, May 30, 2006
You can modify this example by just instantiating multiple
instances of PhotoBox on the same page, each with a different variable name,
and setting the “photos” property differently for each. If
you wanted to reuse the same PhotoBox Panel, you could do so by calling
myPanel.cfg.setProperty(“photos”, your params) dynamically
at runtime (calling a function that sets this argument on the click of each
given button, I would imagine). Keep in mind that the PhotoBox example is very basic,
and intended to show how Panel can be extended to do more complicated things.
You might even decide to make it more feature-rich by enhancing it to use the Connection
utility to dynamically retrieve the photos using the flickr API. I look
forward to seeing whatever you come up with!
Web Developer, Platform Engineering
Does someone have an example
(or can give a noob some guidance) for creating multiple
PhotoBox panels on a single Web page?
I don't want multiple iterations visible at the same time... I just want to be
able to have 3+
buttons on a Web page, each which opens the PhotoBox panel, but populated with
different sets of images in it. (see "panel-photo.html" in the
YUI files for the single-button
Do I need to create some sort of if/when statements within the main code?
Or should this
be handled at the button's "onClick" level, with some sort of
addendum that tells the
"photos:" callout what it should be populated with for that
Anyone that can offer assistance, I'd really appreciate it.
(Yahoo! team: would it be possible in the next update to add multi-button examples
this for people? I'd imagine a lot of people would like to see how to have
instances of a particular tool on a page, while being able to utilize the
existing code in the
most efficient manner.)
Your message has been successfully submitted and would be delivered to recipients shortly.
Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer.
We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.