语言

Menu
Sites
Language
About using javascript in Web Control

Hi all,

I faced with the following issue. In my app i use web control. I use javascript to change some fields in my web page.

(String jscript;

jscript = "document.getElementById('";
jscript += id;
 
jscript += "').innerHTML=('";
jscript += str;

jscript += "')";)

It seems everything works fine if I use only one instance of web control. But if I use several web controls on different forms my app hangs on EvaluateJavascriptN call without any answer or crash. I tested on divice and emulator.  Is there anyone who faced with such problems? 

 

Regards,

Roman Lebedenko

RIA Novosti

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

4 回复
kavish
About using javascript in Web Control You need to pass ID in document.getElementById(). The code snippet is given below. var msg = "Testing application"; document.getElementById("countID").innerHTML = message; Thank you,
Ben Prendergast
Did that fix work for you? I am having the same freeze/crash on EvaluateJavascriptN when navigating between pages.
kavish
Yes, it is working fine for me. If you are facing issue with pages navigation in that case you can share(copy and paste your code) your code snippet so that it will help to analyze your issue.
Ben Prendergast
I was able to figure it out. It seems that the load was slow and a call to EvaluateJavascriptN was happening before the web page had been fully initialized. Odd though that it would be fine with the error the first time the page was created but any time after that it would fail.