Often your application or web page requires the functionality to be able to open a new window, send e-mail, or trigger a JavaScript event. How can this be done?
This can be accomplished by tweaking the navigateToURL method to suit your particular use case.
Below are three simple code snippets that demonstrate how to employ the navigateToURL method for opening a new window, sending an email and interacting with JavaScript.
Opening a new window:
navigateToURL (new URLRequest ("http://blog.activetofocus.com"), "_blank");
Sending an email:
navigateToURL (new URLRequest ("mailto: blog@activetofocus.com"));
Interacting with JavaScript:
navigateToURL (new URLRequest ("javascript: window.close ()"));
Calling a JavaScript function:
navigateToURL (new URLRequest ("javascript: MyJsFun (par. ..)"));
This recipe was originally posted at: http://activetofocus.com/blog/navigatetourl-open-a-new-window-or-email-or-with-the-communication-between-js-6/
+