NetTalk Central

Author Topic: Bypassing Read-Only fields  (Read 4219 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Bypassing Read-Only fields
« on: April 02, 2014, 11:53:09 AM »
Hi

On a Form is there a way to make the 'Tab' key skip the Read-Only fields?

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: Bypassing Read-Only fields
« Reply #1 on: April 02, 2014, 03:25:06 PM »
I use the following javascript to skip a delete button in an edit in place browse.  Maybe it will do what you need

Code: [Select]
btnDeletes = document.getElementsByName("deleteb_btn");

for(var x=0; x < btnDeletes.length; x++) 
{
    btnDeletes[x].setAttribute("tabindex",-x);
}

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Bypassing Read-Only fields
« Reply #2 on: April 03, 2014, 01:56:14 AM »
Hi Keith
How about setting the fields as display fields.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Bypassing Read-Only fields
« Reply #3 on: April 04, 2014, 12:13:53 PM »
Hi Terry

Setting to Display works in that the field is bypassed but there are bad side-effects  >:(

The styling is omitted and the 'right-justify' is ignored.  But its worth remembering.

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Bypassing Read-Only fields
« Reply #4 on: April 07, 2014, 12:29:50 AM »
You can obviously add the css effects you want to the display field.

It would take a bit of JavaScript to make it ship over read-only fields when tabbing though. Using the Display type, with the correct css, is the best approach I think.

cheers
Bruce


Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Bypassing Read-Only fields
« Reply #5 on: April 09, 2014, 01:41:25 PM »
Thanks everyone

I agree that creating the Display style that is appropriate would be worth doing.

Cheers

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Bypassing Read-Only fields
« Reply #6 on: April 15, 2014, 02:14:20 AM »
Hi  all

I can report that I now have a style (my-readonly) that makes a display field look like a standard read-only field but which causes 'tabs' and 'returns' to bypass them.  Thanks for the advice on this and I must say again that this is a brilliant result.

Have a look at the 'Read-only' image.  The user could change some of the fields in the first three columns but after 'tab' the cursor could move into the read-only fields in the last four columns.  This was annoying and begged the question - 'if you're not supposed to change these values then why allow the cursor to go there?'

The new style renders only the first three columns active and is a great result - the cursor obediently goes only to the fields that can be changed.

I will post the css on the 'Share' section so that others can use it if it has value.

Cheers

Keith

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