Languages

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

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 Replies
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.