NetTalk Central

Author Topic: How to call a POPUP form from login Window  (Read 6357 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
How to call a POPUP form from login Window
« on: March 24, 2019, 10:16:39 PM »
Hi,
I Want to call a popup form by code,  from the login form and inside  the login code,if a condition is not met, and after/during  the login validation..not having a lot of success.
I want the popup form to capture the details of the included  field in the validation process

(ie if the user's email address field is not populated in the user's profile, (available from a SSV)   I want the popup to be called  with the opportunity to user-enter the email address and then, once accepted,  close the popup and update the user following the completion of the login)

is there such an example, or a suitable way to do this?

Thanks
Richard NT 11.07

Richard I

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: How to call a POPUP form from login Window
« Reply #1 on: March 25, 2019, 02:07:22 AM »
Got it with Form on a form

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: How to call a POPUP form from login Window
« Reply #2 on: March 25, 2019, 02:09:12 AM »
Check out p_web.OpenDialog()

It creates, in HTML, a call to ntd.push().

Just a heads up, this can be a tedius process to get right.  p_web.OpenDialog is just one of several steps to get popups to work correctly. 

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: How to call a POPUP form from login Window
« Reply #3 on: March 25, 2019, 03:18:53 AM »
Hi

I have done that by adding a button, caling the popup. Then hiding the button with css and finaly trigger the button with jQuery - $( "#buttonid" ).trigger( "click" );

Works fine in my project.

/Niels

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: How to call a POPUP form from login Window
« Reply #4 on: March 25, 2019, 03:34:02 AM »
Hi

I have done that by adding a button, caling the popup. Then hiding the button with css and finaly trigger the button with jQuery - $( "#buttonid" ).trigger( "click" );

Works fine in my project.

/Niels

Clever! 
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Richard I

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: How to call a POPUP form from login Window
« Reply #5 on: March 25, 2019, 05:23:35 PM »
Hi all,
Thanks for replying...
I have deleted  the procedure form from the form as it wasnt working, and I have added a required string field...
Does the job...
primed to display recorded email on opening and the prompt says "please edit or add...."
Thanks for your help,
Regards,
Richard