Hi Larry,

The problem is that the href that are created by the Simili in the
bubble do not have an id. So the only way I see is to override the
entire showBubble and add the link an id that can be referenced for
the onClick.

I dont like this idea very much because it means I override the
showBubble action in a very specific way that would probably have to
change with every version upgrade I do.

Do you think otherwise, is there a nicer solution I am missing?

Thanks

Larry Kluger wrote:
> Hi Ora,
>
> Add an onclick listener to the "a" element (the link) and change the href 
> attribute to
> You can google for this type of Javascript help.
>
> Here's how I do it in one of my scripts:
> Note: this is a private object that holds all of the functions and data of 
> the script.
>
>       this.dom =   dom: YAHOO.util.Dom; // I use YUI, others use jQuery, or 
> Prototype or ....
>       a_el = this.dom.get(my_id);  // my_id is the id of the "a" element
>       a_el.href = 'javascript:void(0);';   // reset the href
>
>       YAHOO.util.Event.addListener(a_els "click", this.on_click, my_id);  // 
> this.on_click is the callback function that is invoked when the user clicks 
> on the link,
>     }
>
> If the link is within a Timeline bubble, then you'll need to create the 
> bubble's content yourself.
>
>
> If you want the special action to happen instead of the bubble being shown, 
> then the easiest way would be to overload the show bubble function -- have it 
> either do something special or show the bubble, depending on the event's 
> details.
>
> Larry
>
>
>
>
> ________________________________
> From: ora <[email protected]>
> To: SIMILE Widgets <[email protected]>
> Sent: Thursday, April 2, 2009 11:21:24 AM
> Subject: overriding the click on link behavior
>
>
> Hi,
>
> I dont know if this is an easy one but....
> I want that everytime the link of a certain event is clicked to do my
> own action, e.g run some kind of javascript for opening this url in a
> special format (instead of really opening the url in a new browser).
>
> know of a nice way to do it?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to