I'm overriding fillInfoBubble() to do some custom stuff with my info
bubbles.
I need to access some info about the event that was clicked on inside
my fillInfoBubble() method.
I came up with a solution for this, but it seems a bit kludgey and I'm
wondering if there's a better solution.
Inside the "event" XML node, I am embedding the data I need encoded as
a JSON object, like so:
<event .... >
{'param1':'val1', 'param2', 'val2'... }
</event>
Then in fillInfoBubble(), I grab this info using a regex and convert
it like so:
var jsonString = elmt.innerHTML.match("{.*}");
var eventInfo = eval('(' + jsonString + ')');
var myProp = eventInfo['myProp'];
Is there a better way to do this? Can I just embed the information I
need in the event XML and access it somehow?
Thanks!
- Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---