windows phone 8 - how to load html with javascript in wp8 web browser control? -
i have web browser control in windows phone 8. want load html in web browser control
my html string is
string htmlstring= " <html> <head> <title>kayako chat</title> </head> <body><!-- begin fusion tag code - not edit! --> <div> <div id=\"proactivechatcontainer6bahdzbxzq\"> </div> <table border=\"0\" cellspacing=\"2\" cellpadding=\"2\"> <tr><td align=\"center\" id=\"swifttagcontainer6bahdzbxzq\"> <div style=\"display: inline;\" id=\"swifttagdatacontainer6bahdzbxzq\"> </div> </td></tr> </table> </div> <script type=\"text/javascript\"> var swiftscriptelem6bahdzbxzq=document.createelement(\"script\"); swiftscriptelem6bahdzbxzq.type=\"text/javascript\"; var swiftrandom = math.floor(math.random()*1001); var swiftuniqueid = \"6bahdzbxzq\"; var swifttagurl6bahdzbxzq=\"http://kcs.kayako.com/visitor/index.php?/default/livechat/html/htmlbutton/chjvbxb0dhlwzt1jagf0jnvuaxf1zwlkptziywhkemj4enemdmvyc2lvbj00ljuzlji2mzmmchjvzhvjdd1gdxnpb24my3vzdg9tb25saw5lpwh0dhalm0elmkylmkzry3mua2f5ywtvlmnvbsuyrl9fc3dpznqlmkzmawxlcyuyrmzpbgvfy3viowcyzxjiz21yytm2lnbuzyzjdxn0b21vzmzsaw5lpwh0dhalm0elmkylmkzry3mua2f5ywtvlmnvbsuyrl9fc3dpznqlmkzmawxlcyuyrmzpbgvfmgdrowo4a3q2a21ubjljlnbuzyzjdxn0b21hd2f5pwh0dhalm0elmkylmkzry3mua2f5ywtvlmnvbsuyrl9fc3dpznqlmkzmawxlcyuyrmzpbgvfc25nmdrlcmi0cnhnzgzplnbuzyzjdxn0b21iywnrc2hvcnrset1odhrwjtnbjtjgjtjga2nzlmthewfrby5jb20lmkzfx3n3awz0jtjgzmlszxmlmkzmawxlxzawzww3bhaxadbozxrtzy5wbmckyjixowvhmtfkmwq1zda4zmm2nwqymtbkotfmn2jkyjk2njexnjnhyq==\"; settimeout(\"swiftscriptelem6bahdzbxzq.src=swifttagurl6bahdzbxzq; document.getelementbyid('swifttagcontainer6bahdzbxzq').appendchild(swiftscriptelem6bahdzbxzq);\",1); </script><!-- end fusion tag code - not edit! --> </html>";
i did not working
var htmlcode = httputility.htmldecode(htmlstring); webview1.navigatetostring(htmlcode);
the best way it:
webbrowser1.documenttext = "html"
if not working:
wb.navigate(""); { application.doevents(); } while ((wb.readystate != webbrowserreadystate.complete)); wb.document.body.innerhtml = "html";
Comments
Post a Comment