NetTalk Central

Author Topic: Force an user to use save or cancel.  (Read 5201 times)

wvanderstek

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Force an user to use save or cancel.
« on: December 15, 2008, 07:10:08 AM »
Hello,

I am using the XP style menu's. As soon as an user click on an item on the menu I want to make all the other menu and/or menu-items read-only/unable to click. This is wanted to force the user to select save or cancel on the form before clicking on another menu-item. Any help is appreciated. FYI, I am using frames.

Thanks,
Wilco

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Force an user to use save or cancel.
« Reply #1 on: December 15, 2008, 06:43:54 PM »
The problem is you can't stop them from using the back and forward buttons on the browser.

Rather than make all the menu items read only, maybe don't display the menu at all on a form by excluding it from the header?

Cheers,

Kevin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Force an user to use save or cancel.
« Reply #2 on: December 15, 2008, 09:28:41 PM »
Wilco,

As Kevin says, there's no real way to "force" them to press either button.

They could;
a) close the browser
b) just ignore the page (which at the very least would cause the session to timeout eventually)
c) type a different address in their Address bar of their browser
d) select something from their favorites list,

and so on.

So whatever you do, you'll never "force" them to press a button.

So instead of hiding menu items (which is possible) perhaps there's some other approach you can take. Tell us more about why it's so important for them to press Save or Cancel and perhaps we can offer some advice on another way to do it.

Cheers
Bruce

wvanderstek

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Force an user to use save or cancel.
« Reply #3 on: December 16, 2008, 02:40:48 AM »
Yes,

Thanks to both of you for the reply. You both are right about the back and forward stuff. The problem is that we are using topspeed files, it is a small project. We are using the autoinc on the key. This causes that topspeed creates a record when hitting insert and when hitting save the record gets updated.

But if the user hits insert and then moves on to another choice in the menu, a record that was created by the insert remains in the table. So we do have ghost records.

Is there an easy way to prevent this without changed code and the dct ?

thanks,
Wilco


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Force an user to use save or cancel.
« Reply #4 on: December 16, 2008, 10:39:19 PM »
Hi Wilco,

Ok, so let's accept for the moment that ghost records can be created. There's no way to prevent that (if the auto-inc is up-front). So then the solution is simply to have a periodic background process that scans the file and removes these records.

>> We are using the autoinc on the key. This causes that topspeed creates a record when hitting insert and when hitting save the record gets updated.

Well no, it's not Topspeed doing this - it's the Clarion template. NetTalk is a bit smarter than that.

However you don't necessarily _have_ to do the auto-inc up front. In fact the NetTalk WebServer Form does not do it up front unless it thinks it has to. (It typically has to if you have a child browse on the form.) So if your insert form is "simple" then the autoinc will only happen when the user clicks on save.

You can override the NetTalk "cleverness" using options on the advanced tab of the form template settings.

Cheers
Bruce

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Force an user to use save or cancel.
« Reply #5 on: December 17, 2008, 09:45:17 PM »
the other option possibly is just to store the data in memory and write it out to the file on save.

wvanderstek

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Force an user to use save or cancel.
« Reply #6 on: December 17, 2008, 11:10:27 PM »
Hello,

Thanks again all for the help. We do have child browses, so we leave it for now and run a background process to eliminate the ghost records.

Best,
Wilco