NetTalk Central

Author Topic: Validation stops working if another window is called first !  (Read 6858 times)

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Validation stops working if another window is called first !
« on: April 15, 2011, 05:25:19 AM »

NT 5.22
Show stopper for me.

Attached is an amended web1 example and dct.

When you insert, the "Name" is a forced field.
If you try and click "save" you will get the usual "name: required" error message.

BUT, if you click the "Open Other Form" button which calls a simple memory form; when you then close that form and come back to the main form, the validation no longer happens when you click save.
There is no validation at all as far as I can see. You can click save without an errors.


[attachment deleted by admin]
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Validation stops working if another window is called first !
« Reply #1 on: April 15, 2011, 06:02:10 AM »
I'll check it out.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Validation stops working if another window is called first !
« Reply #2 on: April 15, 2011, 10:51:14 PM »
Hi Bryan,

the problem here is that you're "mixing your metaphors".
Once you go to a popup window, all windows "below" that must be popups as well.
In your example, OtherForm is called as a "page" so you'll notice when that page "closes" the original form then opens as a "page" instead of  a popup.

This restriction may be lifted sometime in the future, but for now once you "go popup" you need to "stay popup".

(the global nettalk webserver extension has a setting to "turn popups on".

Cheers
Bruce

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Validation stops working if another window is called first !
« Reply #3 on: April 18, 2011, 12:04:30 AM »
Once you go to a popup window, all windows "below" that must be popups as well.
In your example, OtherForm is called as a "page" so you'll notice when that page "closes" the original form then opens as a "page" instead of  a popup.

This restriction may be lifted sometime in the future, but for now once you "go popup" you need to "stay popup".

(the global nettalk webserver extension has a setting to "turn popups on".

Cheers
Bruce
If I understand, then you say I need to turn off "Open Form As Popup" on the browse? Or set the general extension default to "OFF"?
If I do this, then the same thing happens as I described above. Validation is lost when you open and close the "otherform".

It seems to work if I call "otherform" as a popup. If I cancel out of OtherForm, then the validation is still working on the mainform.
But because of the other bug I've reported, if I click Save on the OtherForm, then the Save btuton of the main form stops working anyway.

So I'm still stuck at square one.
« Last Edit: April 18, 2011, 12:08:50 AM by spot1701 »
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Validation stops working if another window is called first !
« Reply #4 on: April 18, 2011, 03:24:32 AM »
>> If I understand, then you say I need to turn off "Open Form As Popup" on the browse? Or set the general extension default to "OFF"?

The global extension lets you turn it all on, all off, or just use the local setting. But yes, I'm saying your local setting should be set to use a popup.

>> If I do this, then the same thing happens as I described above. Validation is lost when you open and close the "otherform".

nope.

>> It seems to work if I call "otherform" as a popup. If I cancel out of OtherForm, then the validation is still working on the mainform.

yep.

>> But because of the other bug I've reported, if I click Save on the OtherForm, then the Save btuton of the main form stops working anyway.

that's a separate issue.

** bear in mind the user can close the window lots of ways, without you being alerted. For example they can use the X at the top right of the screen, which is _not_ the same as Cancel. Or they can close their browser, or go to another page. You should not rely on the "cancel" button.

cheers
Bruce

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Validation stops working if another window is called first !
« Reply #5 on: April 18, 2011, 05:03:52 AM »
>> If I do this, then the same thing happens as I described above. Validation is lost when you open and close the "otherform".

nope.

What do you mean by "nope"?
That it works for you?
Or that I have to use popups?

Quote

** bear in mind the user can close the window lots of ways, without you being alerted. For example they can use the X at the top right of the screen, which is _not_ the same as Cancel. Or they can close their browser, or go to another page. You should not rely on the "cancel" button.
I appreciate that but it is sometimes necessary which is why I don't always want the form to be a popup.

Thanks

Bryan