Form clearing of first submit

<< Click to Display Table of Contents >>

Navigation:  Forum >

Form clearing of first submit

Forum link

 


 

02-08-2021, 08:53 PM:

 

I am using Intraweb 15.1.X with Delphi XE10.4

 

Currently the Intraweb application is in stand-alone mode.

 

The web app has three pages currently  : A log-on page with username and password, a main page that is displayed after a successful log-on and a "request reset password" page.

 

On the log-on page there is a HTMLLabel ( "Forgot Password" ) that when clicked runs the following code:

 

  TIWFforgotPassword.Create(WebApplication).Show;

 

On the TIWForogtPassword form is an TIWedit and a TIWButton.  The IWButton has an OnClick function associated with it.

 

When I fill in the IWEdit and click the IWButton the first time after the window is shown, the TIWedit is cleared and the OnClick function is not called.

 

If I immediately fill in the IWedit and click the IWButton, again, the onClick function is executed.  (  I have set a break point in the OnClick function so I know when it runs ).

 

Why is it taking two presses of the TIWbutton for the data to be submitted to the OnClick function?

 

THank you.

 

Rick Howitt

 


 

02-09-2021, 08:52 PM:

 

There are 2 separate buttons. The button on the form with the link is getting ITS onclick called because it is executing the Show method you put in it. So of course when the forgotform is shown, the button has not been clicked yet so it wont have its onclick called until after it is shown AND then the button is clicked.