NetTalk Central

Author Topic: Completing a field on a form and navigating between tabs  (Read 3419 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Completing a field on a form and navigating between tabs
« on: October 15, 2013, 12:51:19 PM »
Hi, two (simple?) questions:

1. Currently the 'tab' key and 'mouse click on another field' terminates entry in a field.  How can I choose 'Enter' as another valid key? (Note: my form doesn't have a Save button - its just a scratch form that is thrown away after use).

2. My form has multiple tabs.  I have a button on some of the tabs which causes client side processing and resets of some form fields but I would additionally like to choose the tab to display after the client code has completed.  That is: when the form is refreshed I want to be on another tab.  Possible?

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Completing a field on a form and navigating between tabs
« Reply #1 on: October 17, 2013, 01:47:27 AM »
>> 1. Currently the 'tab' key and 'mouse click on another field' terminates entry in a field.  How can I choose 'Enter' as another valid key? (Note: my form doesn't have a Save button - its just a scratch form that is thrown away after use).

Enter already completes the field, in the sense that the value is sent to the server when the user presses enter. With 7.27 I've tweaked it so that Enter also moves to the next field on the form (as long as there is no default button, or Save button on the form).

>> 2. My form has multiple tabs.  I

what tab type are you using on this form?

cheers
Bruce



Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Completing a field on a form and navigating between tabs
« Reply #2 on: October 17, 2013, 12:29:09 PM »
Hi Bruce - great news on 'return'.

My Form Style is 'Default' and I can see that setting to 'Accordian' etc changes how the tabs are presented.  So, my tabs are presented horizontally across the form.  My first tab is 'Results' - it has all of the answers.  The other tabs allow inputs in various categories - 'Aerodynamic Drag', Tyres', Track Conditions' etc.  If a user selects one of these tabs and makes changes to the fields then hits a 'Calculate' button I would like to redisplay the form on the 'Results tab which saves them the irritation of having to select it.

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Completing a field on a form and navigating between tabs
« Reply #3 on: October 17, 2013, 10:31:20 PM »
Hi Keith,

>> My Form Style is 'Default'

Many NetTalk settings can be set "globally" - meaning that it's a lot quicker to change things across your whole site than having to visit each procedure individually.

(Aside: I am in the process of moving the defaults into one place, the Settings / Defaults tab but for now...)

You'll locate the "default setting" in the WebServer procedure, NetTalk Extension, Settings tab. Then go to Styles / Form - and the top setting there "Form Type" - I'm guessing on your system it's set to 'Tab'

Back to your Tab question - this has come up before, and the answer was dependant on the tab type (which isn't ideal.) So with build 7.27 there's a new answer;

If you want to change the tab when the page is open, set a variable loc:tabto to the tab number you want, and call do ChangeTab. Remember that tabs are numbered from 0. So, for example

  loc:tabTo = 3
  do ChangeTab


sets the user onto the _fourth_ tab which is visible on the form.
This code can be done most anywhere on a form. It is also "tab type" independent - meaning it'll work for all three tab types where it makes sense (Tab, Accordion and Wizard.)

Cheers
Bruce

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Completing a field on a form and navigating between tabs
« Reply #4 on: October 20, 2013, 12:29:37 PM »
Bruce, Yes, my form type is Tab.  This is all good news - roll on 7.27

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Completing a field on a form and navigating between tabs
« Reply #5 on: October 20, 2013, 10:12:48 PM »
7.27 is up.

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Completing a field on a form and navigating between tabs
« Reply #6 on: November 12, 2013, 02:27:49 PM »
Hi, regarding 'completing a field' Bruce said:

Enter already completes the field, in the sense that the value is sent to the server when the user presses enter. With 7.27 I've tweaked it so that Enter also moves to the next field on the form (as long as there is no default button, or Save button on the form).

I now am running NT v7.28 and the 'Enter' key seems neither to send the value to the server nor to move to the next field.  I do not have a 'Save' button and the only button on the Form/Tab is not the 'Default' button so it seems to meet the criteria.

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Completing a field on a form and navigating between tabs
« Reply #7 on: November 13, 2013, 06:19:11 AM »
see if you can duplicate in an Example Keith. If you can please post it here.

cheers
Bruce

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Completing a field on a form and navigating between tabs
« Reply #8 on: November 13, 2013, 01:30:29 PM »
Hi Bruce

I just took a dictionary I had and wizard-ed a new app called 'TestReturn'. 

Choose: Browse/Pipeline/Insert and there are two fields.  When you enter, say, 'Bill' in owner and hit Tab then 'Client' will display 'Return Ok'.  If you hit ' Return' it won't which seems to indicate that the value is not being sent to the server.

Thanks for your attention.

Keith



[attachment deleted by admin]
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Completing a field on a form and navigating between tabs
« Reply #9 on: November 18, 2013, 02:10:24 AM »
Good example.
First thing I noticed was that, well, it worked.
So I suspect it's browser related.
FireFox and Chrome see to work correctly, but IE does not.

Some research shows that this is a general complaint. In IE pressing Enter does not "complete" a field, so there's no "change" event.

For build 7.29 I have added some code to the JavaScript which should overcome the problem though.

Cheers
Bruce

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Completing a field on a form and navigating between tabs
« Reply #10 on: November 22, 2013, 01:17:15 AM »
Thanks Bruce.  Confirmed that this problem is now fixed with NT 7.29 for IE.

I will have to remember to test with the different browsers.  Is it the case that when testing browsers you are looking for cosmetic differences - there is no chance that the server side could be affected by browser behaviour?

If it could then that would mean a considerably extended test regime.  What is your advice?

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Completing a field on a form and navigating between tabs
« Reply #11 on: November 22, 2013, 09:44:18 AM »
Hi Keith,

>> Confirmed that this problem is now fixed with NT 7.29 for IE.

unfortunately the fix regressed some other functionality, so I've made a 7.30  build which should sort it out.

>> I will have to remember to test with the different browsers.  Is it the case that when testing browsers you are looking for cosmetic differences - there is no chance that the server side could be affected by browser behaviour?

The server (mostly) doesn't care about the browser. There is some code in the server specific to IE, but it's not much.

Differences between the browsers (that are not immediately obvious) tend to me either very "fringe" or just cosmetic.

>> If it could then that would mean a considerably extended test regime.  What is your advice?

Personally I don't cross-test much, if at all. I work in FireFox most of the time (because Firebug is still the nicest debug tool) and I browse a lot in Chrome (especially our production stuff) and I'm almost never in IE. (except when something like this crops up.)

Which browser you use is obviously your choice. But that's the point, there is a choice, and some browsers are better than others. I figure if something is broke in IE someone will tell me pretty quickly. As you say testing across "all browsers" can be very time consuming, and very expensive (IE7, IE8, IE9, IE10 and now IE11 theoretically all need testing) as well as any number of mobile browsers, FF, Chrome, Opera and so on.

Given that the problems are usually cosmetic, or completely broken, I don't spend too much time on it.

cheers
Bruce