×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    May 2008
    Posts
    73

    Question Capture click event on buttons in an html page loaded using browser control

    Hi everybody,

    We need to capture click event of buttons within an html page loaded in browser control, currently I try to get the EEikBidOk key in OfferKeyEventL() and then judge if the focused element is the target one, but seems that we can't get the attributes (such as name and value) of focused elements, so we can't identify those elements of the same type, right? For example if there are 2 buttons in an html page, how can we distinguish each of them from the other?

    Anybody knows how to capture the click event of a button? or how to get attributes of focused element?

    Code:
    TKeyResponse 
    CBrCtlSampleAppContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
        {
        if (iBrCtlInterface)
            {
            TBrCtlDefs::TBrCtlElementType type = iBrCtlInterface->FocusedElementType();
            if (aKeyEvent.iCode == EKeyDevice3 && type == TBrCtlDefs::EElementButton)
            	{
                    // here how can we know information of this button such as its id or name?
            	LoadingHtmlDataWithBufferL(_L8("<html><p>Test Complete!</p></html>"));
            	return EKeyWasConsumed;
            	}
    		
            return iBrCtlInterface->OfferKeyEventL(aKeyEvent, aType);
            }
    
        return EKeyWasConsumed;
        }
    Last edited by curiouswalker; 2010-07-24 at 04:53.

  2. #2
    Regular Contributor
    Join Date
    May 2008
    Posts
    73

    Re: Capture click event on buttons in an html page loaded using browser control

    Anybody gives me some suggestion

Similar Threads

  1. capture inbox click event
    By pamelag in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-10-03, 11:20
  2. getting html content using browser control
    By rati2010 in forum Symbian
    Replies: 1
    Last Post: 2008-07-15, 20:22
  3. Help needed urgent: html form in browser control
    By son_08 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2008-03-28, 09:37
  4. capture links in html page & browser API
    By morost in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-03-01, 08:31
  5. How to obtain loaded page from Browser Control API
    By kasuga in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-01-03, 06:33

Posting Permissions

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