locked
Odd behavior on playing java script in a html using web browser control after download a file from the web service RRS feed

  • Question

  • For last 2-3 weeks i am looking for a reason behind my problem. But unfortunately i could not found anything needed.

    It is a Windows Phone Book reader application i am creating using c# and xaml .

    For that i need to download book file from the web service and extract and save audio,image and html data from it. All data are stored in local folder.

    The main functionality is that we can see highlighting of texts with the corresponding audio plays. And the high lighting functionality is done by java script function.

    My problem is that the highlighting text is delaying some times and it doesn't meet with it's audio. And this is happening on the session where the book data downloaded from network or where download operation took place.

    Is there anything related to network download operation can prevent/delay the execution of java script function ?

    Can network download operation makes any impact on Web browser control ?

    Tuesday, August 5, 2014 12:46 PM

All replies

  • Hi Asitis,

    >Is there anything related to network download operation can prevent/delay the execution of java script function ? Can network download operation makes any impact on Web browser control ?

    Per my understanding, webbrowser control in windows phone is used for displaying content. Script is disabled in the webbroser control by default. So I think javascript is not recommended to use in this scenario. See more from http://msdn.microsoft.com/en-us/library/windows/apps/ff431797(v=vs.105).aspx .

    Webbrowser supports to display static web content, so maybe you can try the following approach. Firstly, get the html content from the url, find the javascript code in html content string. Add some js delay code into the string and then display it in webbrowser control. http://stackoverflow.com/questions/21359899/javascript-delay.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, August 6, 2014 3:12 AM
    Moderator
  • Hi Asitis,

    >Is there anything related to network download operation can prevent/delay the execution of java script function ? Can network download operation makes any impact on Web browser control ?

    Per my understanding, webbrowser control in windows phone is used for displaying content. Script is disabled in the webbroser control by default. So I think javascript is not recommended to use in this scenario. See more from http://msdn.microsoft.com/en-us/library/windows/apps/ff431797(v=vs.105).aspx .

    Webbrowser supports to display static web content, so maybe you can try the following approach. Firstly, get the html content from the url, find the javascript code in html content string. Add some js delay code into the string and then display it in webbrowser control. http://stackoverflow.com/questions/21359899/javascript-delay.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    I set Web browser IsScriptEnable property to true so java script action can run inside.

    As you told, we saved the html file in to local and just loading it from local every time. And it works well in all cases except on the session where book data downloading process is taking place. And the bug is not really consistent.

    survey url address seems vague to understand, can you tell it ?


    Wednesday, August 6, 2014 6:20 AM