Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form with no name submit
#6
(2025-03-09, 12:39:50)wila Wrote: Hi CYZ,

Use the event OnNewWindowsRequested to block the opening of a new window by setting Args.Handled to True.
Then use navigate to browse to the URL you needed to go.

The VB6 - New Window Handling example shows you in more details, but let me copy & paste the specific code I meant as it explains more than just one technique.
Code:
Private Sub EdgeWebBrowser_OnNewWindowRequested(ByVal Args As AntViewAx2.IAntViewNewWindowRequestedEventArgs)

  ' ..

  If OptionRadio(1).Value = True Then

    Args.Handled = True

    EdgeWebBrowser.Navigate Args.URI

  End If

I just noticed you use VFP.

There is an example on how-to do this too for Fox Pro in the examples of AntView version 2.

edit: and now I see that the url is "#", so the same page. I guess that there's an onclick event attached to that url that handles whatever the link should do. It might enough to just block the click and not navigate. Not sure, we might be missing context.

--
Wil

Thanks, Wil. I will test it.

CYZ
Reply


Messages In This Thread
RE: Form with no name submit - by wila - 2025-03-06, 22:09:53
RE: Form with no name submit - by wila - 2025-03-09, 12:39:50
RE: Form with no name submit - by carlos@agpsoftware.com - 2025-03-10, 19:31:22
RE: Form with no name submit - by wila - 2025-03-17, 10:41:10
RE: Form with no name submit - by wila - 2025-03-20, 16:21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)