This took me a while to figure out. If anyone else needs this functionality
this can save you a lot of searching and testing.
Problem:
1) You have a web page already loaded in the client browser with an empty <div>.
2) You insert html into the innerHTML of the <div> from an LC server callback.
3) The html has JavaScript.
The JavaScript will not be executed.
But if you insert this code you can make it work. This is an empty image with
onLoad function.
Example of in-line code:
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
onload="alert('test');this.parentNode.removeChild(this);" />
Or
Example to execute a page's existing JavaScript function:
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
onload="myJavaScriptFunctionCall();this.parentNode.removeChild(this);" />
Just a little diddi I thought I'd pass on...
Ralph DiMola
IT Director
Evergreen Information Services
[email protected]
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode