×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Albacete, Spain
    Posts
    380

    Browsing with Browser control

    I am using the browser control to enable simple "customizable" interface.
    I have started with a very simple Login / password HTML form with a button. I can display it on the browser control, but can't get to move between the form fields (fill one textbox, then the other and the press submit button).

    How should I do it?
    What do I need to do to allow a user go from one field to another in an HTML form displayed on a Browser Control?
    ----------------------------------------------
    Every journey starts with a small step.

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Albacete, Spain
    Posts
    380

    Re: Browsing with Browser control

    Following up, my currently very simple app has two main functions. Both are in a container class derived from CCoeControl:

    Code:
    void CEulenAppView::ConstructL(const TRect& aRect)
    	{
    	// Create a window for this application view
    	CreateWindowL();
    
    	// Set the windows size
    	SetRect(aRect);
    
    	// Activate the window, which makes it ready to be drawn
    	ActivateL();
    	
    	iCommandBase = TBrCtlDefs::ECommandIdBase;
    	iBrCtlCapabilities = 	TBrCtlDefs::ECapabilityDisplayScrollBar | 
    				TBrCtlDefs::ECapabilityLoadHttpFw;
    	TRect rect(Position(), Size());
    	iBrCtlInterface = CreateBrowserControlL(this,
    						rect,
    						iBrCtlCapabilities,
    						iCommandBase);
    	LoadingContentWithFileHandleL(KLogin_Form);
    	iBrCtlInterface->SetFocus(ETrue);
    	iBrCtlInterface->ActivateL();
    	}
    
    void CEulenAppView::LoadingContentWithFileHandleL(const TDesC& aFileName)
        {
        RFs fs;
        RFile file;
    	TFileName privateFP, loginformfile;
    	
    	//	Los formularios se encuentran en la carpeta privada de la 
    	//	aplicación para que el usuario no los pueda tocar. 
    	//	Tenemos que sacar el path a la carpeta privada.
        User::LeaveIfError(fs.Connect());
        CleanupClosePushL(fs);
        TFindFile PrivFolder(fs);
        fs.PrivatePath(privateFP);
        PrivFolder.FindByDir(privateFP, KNullDesC);
        loginformfile.Copy(PrivFolder.File());
        loginformfile.Append(aFileName); 
        User::LeaveIfError(file.Open(fs, loginformfile, EFileShareReadersOnly));
        CleanupClosePushL(file);
        iBrCtlInterface->LoadFileL(file);
        CleanupStack::PopAndDestroy(2); // file, fs
        }
    loginformfile is a very simple username / password HTML form with a "submit" button. It gets displayed on the screen but I can't move between the fields. The username textbox seems to have focus but I cannot write any text inside it.
    What do I need to do?, I frankly can't get it by looking at the BrCtlSampleApp in the SDK.
    ----------------------------------------------
    Every journey starts with a small step.

  3. #3
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    119

    Re: Browsing with Browser control

    Have you added CEulenAppView to the control stack, so that it gets key events? And are you passing these events to the browser control via OfferKeyEventL()?

  4. #4
    Registered User
    Join Date
    Dec 2005
    Location
    Albacete, Spain
    Posts
    380

    Re: Browsing with Browser control

    Thanks Alav,

    That was the issue. I solved it a few hours after I sent the post.

    Now I have a different problems. When I display a HTML form with textboxes and try to write inside any of them, the text I write is entered above the box. It gets inside the box when I click the down arrow key. It happens also with the browser control example that comes with the SDK, and it happens in all models I have tried (N71, E71, 6210, E5800). But it does not happen with the handset WEB Browser. Have not found out how to fix that.
    ----------------------------------------------
    Every journey starts with a small step.

Similar Threads

  1. Browser Control API questions
    By Víctor Penela in forum Symbian
    Replies: 0
    Last Post: 2007-04-23, 17:01
  2. Browsing History from Opera Browser
    By vvsnaresh in forum Symbian
    Replies: 1
    Last Post: 2005-12-08, 19: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
  •  
×