Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

htmlloader - set parameter in js [AIR]

New Here ,
Dec 19, 2016 Dec 19, 2016

In the loaded html page has a parameter: param = 0.

For example, I want to change the parameter to: param = 1

I do: htmlloader.window.param = 1

The parameter is replaced, but I need to get changed the whole page.

When I do this: document.documentElement.outerHTML

in the JS script still remains: param = 0;

What could be the problem and whether it is possible to solve it?

maybe it's a bug?

TOPICS
ActionScript
250
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 23, 2016 Dec 23, 2016
LATEST

Maybe my question is not clear. More:

test.html

<script>   var param = 0;</script>

as3

htmlString = File.documentsDirectory.resolvePath("test.html");createHtmlLoader(htmlString.nativePath);private function createHtmlLoader(url:String��void {     html = new HTMLLoader();   var urlReq:URLRequest = new URLRequest(url);  html.width = 550;  html.height = 400;  html.addEventListener(Event.COMPLETE, onLoad);  html.load(urlReq); }private function onLoad(e:Event��void {

  var document = html.window.document; 

  //!! in trace: param = 0  trace(html.window.param);   //!! set param = 1  html.window.param = 1;   //!! in trace: param = 1; ok  trace(html.window.param);  trace(document.documentElement.outerHTML);   //!! in trace: param = 0; Why?}

When i want to get the whole document: document.documenElement.outerHTML

JS script remains unchanged.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines