Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form with no name submit
#10
For anybody else reading this. The issue has been resolved.

The navigation that caused the issue was indirect by triggering a javascript click event from calling ElementClickByQuerySelectorSync.

Because the synchronized method was used, the OnNewWindowRequested event was not getting triggered.
By using the ElementClickByQuerySelector method instead, things started to work as expected and the creation of the new window could now be stopped.

FWIW, we used the following in the OnNewWindowRequested event.
Code:
*** ActiveX Control Event ***
LPARAMETERS args

lcURL = ""

Args.Handled = .t.
lcURL = Args.URI
Thisform.currenturl1 = Args.URI   
Args.NewWindowDispatch (thisform.oAntview1.object)
As you can see here, the method to get the current URI and then use method navigate is not used, but instead we tell the OnNewWindowRequested event to re-use the existing AntView object for the "New Window" by assiging it to NewWindowDispatch. Both methods work with tiny differences.

If you navigate explicitly then you get to keep navigation history and the "back button" will work.
If you assign the current AntView object as the "new window" then your navigation history is gone and there will be no "back button".
Btw, the back button here is the "Back" option in the context (right click) menu.

--
Wil
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 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)