Javascript loses reference to AIR function

stevie

New Member
I have an Adobe Air desktop application which has, as part of the app, an HTML window for displaying HTML/JavaScript. During initial load, I am able to successfully call from JavaScript back to the enclosing AIR application. If, however, I press an AIR button to reload the exact same content into the HTML window, the JavaScript call fails. The JavaScript code is automatically generated and inserted into the HTML and looks like this: \[code\]<button onclick="bClk0a()">Connect<script>function bClk0a() { window.bdPaneInstance.getAccelData("Name","https://... "); }</script></button>\[/code\]On initial invocation, the "window.bdPaneInstance" is correctly associated with the public function "getAccelData". However, once an AIR Button in the enclosing window is pressed (which simply reloads the exact same text), window.bdPaneInstance is permanently null. I infer that the process associated with 'event listener', which is how the AIR Button reloads the AIR HTML window, somehow changes the window associated with the HTML so that "bdPaneInstance" is no longer visible. How do I solve this problem?
 
Back
Top