Re: wxEuphoria: how can I INTERCEPT html link clicks?

new topic     » goto parent     » topic index » view thread      » older message » newer message
DanM said...

Very good! And thanks a lot! But I gotta ask:
it looks to me that what you've done is to make sure that the event handler
properly handles a click on a link, whereas previously the handler was being
ignored (?), but was nonetheless jumping to the link?

Now, the fix you've made, will that allow, if the jumping to the link stuff is deliberately
not included in the event handler, that something else can programmatically be caused to
occur on clicking on a link?? That's what I'm wanting to be able to do. Maybe
I'm not understanding the action correctly?

(What I mean is, since the jumping to the link DID occur before, even though the
event handler wasn't what was making that happen, will that jump still happen
if I try to intercept the action from within the event handler, with alternative
code? I want the alternative code to act, not the "accidental" jump.)

I'm afraid I don't quite get what you're saying. getlost Let me explain the three possible scenarios:

  • You handle the event, fetch the href, and pass it to load_html_page. (As my example demonstrates).
    The wxHtmlWindow operates correctly.
  • You handle the event, but do not call load_html_page.
    Nothing will happen when the user clicks a link.
  • You do not handle the event.
    The wxHtmlWindow operates correctly.

Your event handler may perform any other action to react to the link. The main point is calling load_html_page to allow the link to pass, and not calling it to have it do nothing.

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu