NetTalk Central

Author Topic: NTWS NetMaps need to code befor the popup is called  (Read 3108 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NTWS NetMaps need to code befor the popup is called
« on: June 06, 2021, 06:07:14 AM »
Hi, I have a map and when the user clicks on an icon it goes to a popup form to edit it.
Now I need to have two ways of update the form.
Call the popup, which is donde ok, and change it by code without calling the popup. (I have a check in the page to choose the way of update)
Were to add my code to trap the event clicked "before" the popup is called?
I cant find it,
As I see the clicked event is take by the js cose then the easy way would be add the code to the popup form running it wihout opening the window and return.
How to do it?
Thanks.
« Last Edit: June 06, 2021, 12:50:17 PM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NTWS NetMaps need to code befor the popup is called
« Reply #1 on: June 06, 2021, 11:24:04 PM »
Hi Alberto,

The click happens in the browser, not on the server.
The browser then initiates the action - in this case it runs JavaScript to open the form.

So if you wanted to intercept that click you will need to change the javascript.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NTWS NetMaps need to code befor the popup is called
« Reply #2 on: June 09, 2021, 04:07:50 AM »
I know, but I couldnt do it, then I add this code to the popup form.

Code: [Select]
 
  CODE
  if p_web.gsv('ClickOrdena')=1
    if p_stage = 8192
            !my code...
            DO PostUpdate
        END
    END
    p_stage = Net:Web:Cancel
  END

I know you will not like it, but it works.
I have only one problem, if when I enter the page that contains this popup and p_web.gsv('ClickOrdena')=1 the popup form does not work anymore, like it does not exists.
I think my code is bypassing the popup form activation.
How to solve this?
Thanks
-----------
Regards
Alberto