I’m using the ibox javascript library which is very similar to lightbox in functionality. I’m trying to do something seemingly simple but am having difficulty.
My goal:
Use ibox to show a dynamic graph based on a clicked link.
When the user clicks the link it will grab data from the current table row, format it, and render it using the flot library. This will all be done in a hidden div. This is easy enough. Then the hidden div will be displayed using ibox.
These are both easy enough tasks individually. What i’m having trouble with is combining them into a single click.
Currently I have it setup like this.
[HIGHLIGHT=““Html”]<a href=”#graphContainer" onclick=“loadGraph()” rel=“ibox” title=“Loading Internal HTML Content” >Graph</a>
When a user clicks this link the loadGraph() function never executes. I'm assuming this is because priority is being given to ibox (indicated by the rel attribute). How can I force my onclick event to be executed before the ibox is loaded?
I would even be ok if it was executed after the ibox was loaded, my main goal is to get both actions to occur in a single click.
Thanks for your help, let me know if you need more code.