Return to Snippet

Revision: 10046
at December 4, 2008 18:41 by chrisaiv


Initial Code
//Here's a list of helpful items to capture
var pageURL:String      = ExternalInterface.call('window.location.href.toString');
var pageHost:String     = ExternalInterface.call('window.location.hostname.toString');
var pagePath:String     = ExternalInterface.call('window.location.pathname.toString');
var pageProtocol:String = ExternalInterface.call('window.location.protocol.toString');
var userAgent:String    = ExternalInterface.call('window.navigator.userAgent.toString');
var platform:String     = ExternalInterface.call('window.navigator.platform.toString');
 

private function getQueryString():String
{
     var query:String = ExternalInterface.call("window.location.pathname.toString");
     //ExternalInterface.call("window.location.href.toString");
     return query;
}

Initial URL

                                

Initial Description
Here's how I was able to capture the HREF of a page using actionscript

Initial Title
As3: Capture the HREF, Pathname, Host, userAgent

Initial Tags
javascript

Initial Language
ActionScript 3