×

Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    Nokia Developer Champion
    Join Date
    Sep 2012
    Location
    Morocco
    Posts
    291

    Re: Issues working with web browser control

    Thank you sunder.tinwar for sharing the solution !

  2. #17
    Registered User
    Join Date
    Mar 2013
    Posts
    36

    Re: Issues working with web browser control

    Thanks Loukt, should I edit an exiting wiki page with this updated solution and example or should I write a new page.

  3. #18
    Nokia Developer Champion
    Join Date
    Sep 2012
    Location
    Morocco
    Posts
    291

    Re: Issues working with web browser control

    There is this Wiki Page, I think your solution may fit in it.
    http://www.developer.nokia.com/Commu..._Windows_Phone

  4. #19
    Registered User
    Join Date
    Mar 2013
    Posts
    36

    Re: Issues working with web browser control

    Hey guys I hit another issue with same, couple of website are blocking, injected javascript code.

    Now blocking code in the sense, blocking accessing to this keyword etc. Still your javascript code will be injected and work.

    I need find solution for this as well.

  5. #20
    Registered User
    Join Date
    Jan 2013
    Posts
    34

    Re: Issues working with web browser control

    Can you give more details about what you are trying to do and what is failing?

  6. #21
    Super Contributor
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,578

    Re: Issues working with web browser control

    Quote Originally Posted by Loukt View Post
    There is this Wiki Page, I think your solution may fit in it.
    http://www.developer.nokia.com/Commu..._Windows_Phone
    My feeling is that the article you point to describes the generic techniques quite nicely. Some of what Sunder is doing might go in there - for example explaining the problem that causes "An unknown error has occurred. Error: 80020006" and its workaround.

    However what Sunder is proposing to do is more specific implementation which I don't think will fit so well: - "got values from html page dynamically." (or re implement behaviour to allow webBrowser.Document.GetElementsByTagName(“div”); type semantics)

    Sunder, yes, a separate article explaining your tips and tricks with a downloadable example and cross link to the above example would be fantastic. Bonus points for explaining why you can't use some of the solutions proposed here and this approach you're using is best. Extra bonus points if any "generic" information on WebBrowsers control techniques can go into the other article.

    Regards
    H

  7. #22
    Registered User
    Join Date
    Mar 2013
    Posts
    36

    Re: Issues working with web browser control

    Quote Originally Posted by paulo.morgado View Post
    Can you give more details about what you are trying to do and what is failing?
    So I found the root cause which is very interesting to know, actually site were not blocking my javascript but whats happening was -

    When we browse a website on web browser control, browser control will download its external CSS and JavaScript automatically.

    Now if we try to save html document using webBrowserCntrl.SaveToString(); it will save only html part of it as a string and miss external CSS and JavaScript files.

    Now we can inject our JavaScript and try to navigate html using webBrowserCntrl.NavigateToString(html); but it will load only html part without external CSS and JavaScript files.

    My solution will work perfectly if sites have javascript and css in html file only.

    A Note about HtmlAgilityPack : The issue appears to be that the NuGet package references the incorrect assembly for WP8.

    By default it seems that it references the binary in sl4-windowsphone71, manually removing the reference to the HtmlAgilityPack DLL and referencing the binary in the sl3-wp folder removes the dependency problem.

    That is how I have resolved it anyway.

    So I guess with new control we can't do much. Developers are helpless now.

  8. #23
    Registered User
    Join Date
    Jan 2013
    Posts
    34

    Re: Issues working with web browser control

    Try adding a BASE element to the HTML with the base address of the page.

    But why don't you use the eval function to do whatever you want in the page instead?

  9. #24
    Registered User
    Join Date
    Mar 2013
    Posts
    36

    Re: Issues working with web browser control

    Could not find any good solution for it?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Browser control issues, 100% CPU on processing
    By digitalsol in forum Symbian C++
    Replies: 5
    Last Post: 2010-11-02, 13:40
  2. Replies: 5
    Last Post: 2010-08-17, 10:34
  3. Browser Control LoadUrlL not working
    By saha_forumnokia in forum Symbian C++
    Replies: 3
    Last Post: 2007-12-26, 18:18
  4. S60 Browser Control/Plugin APIs issues
    By moranski in forum Symbian C++
    Replies: 5
    Last Post: 2007-10-17, 06:49
  5. S60 Browser Control/Plugin APIs issues
    By moranski in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-04-23, 09:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •