Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

htmlLoader + javascript

$
0
0

hi everybody,

 

window.htmlLoader.userAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13";
window.htmlLoader.load(new air.URLRequest("http://www.google.com"));        var fileMenu = new air.NativeMenu();        var newCommand = fileMenu.addItem(new air.NativeMenuItem("New"));     newCommand.submenu = new air.NativeMenu();     newCommand.submenu.addItem(new air.NativeMenuItem("Alert"));     newCommand.submenu.addEventListener(air.Event.SELECT, alert_string);        return fileMenu;

function alert_string(){
alert("OK.");
}

why doesnt work???

that is hard to explain, I try to explain.

 

htmloader will get new content of website. then I would like try with "alert" in native menu, then error says:

TypeError: Value undefined does not allow function calls.

 

what means?


Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>