Setting a Button's onclick event to an undefined/custom function
I'm not a captivate developer, but I'm developing a page that will be embedded as an iframe (webobject) inside of a captivate page. The page that I'm developing will display a graph, the data for which will depend on which button is clicked in the parent Captivate page.
Ideally, I'd like to be able to have my captivate developer simply set each button's onclick event to call some function (by name) that I'll define in my iframe page. To do this, I was hoping there was an option to simply give the function name to an onclick event in captivate, so that my iframe can 'reach' into the parent, and set that function equal to a function I've defined in my graph page.
Essentially, I want the end result to be (in a nutshell) something like this:
Captivate page:
<someButton onclick="CaptivateTest1">
<someButton2 onclick="CaptivateTest2">
<iframe src="myGraph.html></iframe>
myGraph.html:
<html>
<!--...Graph stuff here-->
<script>
function myDefinedFunction(){
//Change graph data
}
function myOtherDefinedFunction(){
//Change graph data
}
window.parent.CaptivateTest1 = myDefinedFunction;
window.parent.CaptivateTest2 = myOtherDefinedFunction;
</script>
</html>
