As3: Capture the HREF, Pathname, Host, userAgent

/ Published in: ActionScript 3
Save to your folder(s)

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

Copy this code and paste it in your HTML
  1. //Here's a list of helpful items to capture
  2. var pageURL:String ='window.location.href.toString');
  3. var pageHost:String ='window.location.hostname.toString');
  4. var pagePath:String ='window.location.pathname.toString');
  5. var pageProtocol:String ='window.location.protocol.toString');
  6. var userAgent:String ='window.navigator.userAgent.toString');
  7. var platform:String ='window.navigator.platform.toString');
  10. private function getQueryString():String
  11. {
  12. var query:String ="window.location.pathname.toString");
  13. //"window.location.href.toString");
  14. return query;
  15. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.