×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    10

    Browser Control LoadUrlL not working

    Hi Fellas,

    I want to to display a sample HTML page using Browser control in a container/host application.
    S60 version 3.1

    The code is as follows:
    CreateWindowL();
    ActivateL();

    iCommandBase = TBrCtlDefs:: ECommandIdBase;

    iBrCtlCapabilities = TBrCtlDefs::ECapabilityDisplayScrollBar |
    TBrCtlDefs::ECapabilityLoadHttpFw |
    TBrCtlDefs::ECapabilityGraphicalHistory |
    TBrCtlDefs::ECapabilityGraphicalPage;

    TRect rect(Position(), Size());
    pBr = CreateBrowserControlL(this,rect,iBrCtlCapabilities,
    iCommandBase,
    NULL,NULL,NULL,NULL,NULL);
    if (pBr)
    {
    pBr->ActivateL();
    pBr->SetBrowserSettingL(TBrCtlDefs::ESettingsSmallScreen,1);
    pBr->SetBrowserSettingL(TBrCtlDefs::ESettingsECMAScriptEnabled ,1);
    _LIT(KFile, "file:///c:\\MyBrowserApp\\MyWebPage.htm");
    pBr->LoadUrlL(KFile);
    }


    Result: The emulator just shows up with white screen an nothing else.I have also placed the htm file in ..\Epoc32\c\<MyApp>\..

    Anybody has any clue??!!

  2. #2
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Browser Control LoadUrlL not working

    try putting the file in
    ..\Epoc32\winscw\c\MyBrowserApp\mywebpage.htm
    Amit Kankani
    Nokia Developer Champion

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    10

    Re: Browser Control LoadUrlL not working

    Hello Amit,

    I had mistyped earlier in the post itself.I did put in Epoc32\winscw\c\MyBrowserApp\ itself as you know there wudnt be c\ in Epoc32\.

    Have you done a similar stuff like this and succeded?
    Do we need to Use the SpecialLoadObserver Interface if the htm page has a JS embedded?
    I also tried using the LoadFileL() method as given in dicumentation from the forum but it didnt work.

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    10

    Re: Browser Control LoadUrlL not working

    Ok.....I got the fix.the problem was with the SetRect()..thanks to my ignorance about the S60!!!..

Similar Threads

  1. xhtml with browser control api
    By kotta518 in forum Symbian
    Replies: 0
    Last Post: 2007-12-14, 06:24
  2. Browser control is not loading aspx pages
    By shrosenzwe in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2007-09-20, 17:21
  3. Browser Control API & JavaScript
    By fagiano in forum Symbian
    Replies: 0
    Last Post: 2007-09-07, 15:39

Posting Permissions

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