Page 1 of 1

How to create a field to enter information?

Posted: Mon Nov 28, 2011 4:38 pm
by ruiascensao
Hello,

I have create a small database to store Jobs Numbers. I have to use a code bar scanner. The idea is to have a field that accepts the value from the scanner, cute this jobs number to the next record available. This way Ican enter all job numbers in a fast way and then fiel the other fieds if i need.

Can anyone help me with this?

Thanks in adance.

Regards,
Rui

Re: How to create a field to enter information?

Posted: Thu Dec 01, 2011 10:45 am
by ruiascensao
Hi!!

Any sugestions on this??

Regards,
Rui

Re: How to create a field to enter information?

Posted: Thu Dec 01, 2011 12:29 pm
by zazzium
I suggest, you call a JavaScript function after 'jobs' field is changed that loops through subform 'Jobe code' fields
..and if it's empty give te subform field the 'jobs' value and clear the 'jobs' field...

..be sure to check out http://wiki.nubuilder.com and the tutorial videos.

Re: How to create a field to enter information?

Posted: Mon Dec 05, 2011 12:48 am
by admin
Rui,

This might help.

(put fillNextBlank(this.value) on the onchange event of the field taking the barcode)

Code: Select all




function fillNextBlank(pValue){

   subformName  = 'my_subform';
   columnName   = 'my_field';

   itemArray  = nuSubformRowArray(subformName);

   for(var i = 0 ; i < itemArray.length ; i ++){
   
      var bCode = document.getElementById(itemArray[i] + columnName);
      if(bCode.value == ''){  //-- go to first blank item (row)
         bCode.value = pValue;
         return;
      }
   }
   alert("Add more blank rows..");


}


Re: How to create a field to enter information?

Posted: Mon Dec 05, 2011 3:50 pm
by ruiascensao
Hello,

The delete check box is checked after this process. How can I uncheck?

Regards,
Rui

Re: How to create a field to enter information?

Posted: Mon Dec 05, 2011 10:28 pm
by admin
put

Code: Select all

         document.getElementById('row' + itemArray[i]).checked = false;
just above

Code: Select all

return;
Steven