M213 OPERATING SCREEN
Last updated May 15, 2017

Guidance Shown on Operating Screen (HTML/JavaScript)

By setting [Description] in Data items, you can indicate "notes" beneath the Input form. Since you can set HTML and JavaScript as well as plane text, you can realize a variety of ideas to increase the operational efficiency, e.g. emphasizing the "Note on a business operation", or indicating an URL of hyperlink to "Related website", or indicating a "Counter for the number of input characters ".


a. Indicate Input Examples
Control the fluctuations of the inputting format by enumerating “Input examples”
b. Indicate Reference Value
Reduce the variation due to subjective of the operator by describing a judgment criteria or a selection criteria
c. Warning and Reminder
Sharing business policy or annual target within the organization
  • As a way to reduce input mistakes, it is also effective to set [Initial value] that realizes “pre-entered” (M207)

a. Description on each Data item
Description about the Item that is shown as Data input form (editable) will be displayed
b. Description on Guide panel type data item
Descriptions which are set as “Display” in the Task property will be indicated
  • [Guide Panel] is a special data item for showing “description” (M205)

a. Indicate Descriptions Statically
Describe information to help the business operation in plain text or HTML
b. Indicate External Information
Indicate information on external website capturing with “iframe” of HTML tag
c. Indicate Descriptions Dynamically
indicate a Description that varies referring to data in during entering, by using JavaScript, etc.
  • Setting display changes or data communications using JavaScript is at your own risk
  • JavaScript library “jQuery” is also available
  • If you want to make a reference to “input” elements in HTML with jQuery, for example, set up a searching in “name” attribute
  • Please see Workflow-sample, etc. for more particular Javascript configuration example

R2130 Making the Operations of DOM element(input tag, etc.) Easier with jQuery

M213-2-en
M213-3-en
M213-1
M213-3
M213-4-en



a. UI Decorator
You can easily create HTML for [Guide Panel] to decorate the interface with. UI Decorator

Please note;) Simple operational verification has been conducted on exemplified codes, but operation in every environment is not guaranteed. Be sure to use it at your own risk when using it. Please also use it after acknowledging in advance the possibility that it will stop working in future product updates.Decoration Samples

a. jQuery Library
When describing the “Input Hints” in JavaScript, the library of “jQuery” are available. (It is not guaranteed that all behavior of operations are properly.)
b. Characteristic of jQuery
jQuery is a library that can simplify the coding of JavaScript. (first edition 2006) Since it is easily to configure the input screen change depending on the situation, such as a “input into form” or “operation of clicking”, it allows you to pursue the improvement of the input efficiency in accordance with your business. It is described in the syntax, i.e. jQuery("div.column").click(function(){ jQuery(this).css( "background-color", "lightgray") }); (Basic knowledge of JavaScript will be needed.)
c. Notes in “Input Hint”
Although all of HTML / JavaScript in the [Description] of each data item will be loaded, [Description] will not be loaded if the permission of the Task has been set as [display only] or [hide] in the Process. (However, HTML / JavaScript in the [Description] of a Guide panel type data item will be loaded if set as [Display only].) There is a possibility that the input screen becomes unstable by improper JavaScript / jQuery. $ cannot be used as alias. As a rule, meta-characters such as “[” (bracket) and “(” (parenthesis) are needed to be escaped with “\\” (two backslashes)(Official Selectors
d. Functions and Sample Codes that would Help Your Business
♦ Event = Specify with Attribute Selector, Class SelectorID Slector, etc.

jQuery('input[name="data\\[3\\].input"]').on('keypress keyup change',function(){ // If there is a change in the input value of the third item
//Detects an input of alphanumeric by keypress, detects an input of the delete key and the backspace key by keyup
// Detects focusout by change
myfunc(); 
}); 

jQuery('textarea[name="data\\[4\\].input"]').on('keypress keyup change',function(){ // If there is a change in the input value of the 4th item
// Detects an input of alphanumeric by keypress, detects an input of the delete key and the backspace key by keyup
// Detects focusout by change
var thisValueLength = jQuery(this).val().length; // Count the number of characters
jQuery('#mycounter').html(thisValueLength + "characters"); // Rewrite the HTML inside <p id="mycounter"></p> 
}); 

jQuery('input[name="data\\[3\\].input"], textarea[name="data\\[4\\].input"]').on('keypress keyup change',function(){ 
// If there is a change in the input value of the 3rd or 4th item (Enumerate the selectors separating with a comma)
// Detects an input of alphanumeric by keypress, detects an input of the delete key and the backspace key by keyup
// Detects focusout by change
myFunc(); 
}); 

jQuery('.myButton').on('click',function(){ // If <input type="button" value="Google Map" class="myButton"> is clicked
myFunc(); 
}); 

♦ Retrieving = Within a Form:val() Within a Tag:text() html()

var textStr = jQuery("select[name='data\\[9\\].selects']").val(); // Select-box
var textStr = jQuery("select[name='data\\[9\\].selects'] option:selected").text(); // Select-box (label)
var textStr = jQuery("input[name='data\\[9\\].selects']:checked").val(); // Radio button
var textStr = jQuery("input[name='data\\[9\\].selects']").val(); // Search select (id)
var textStr = jQuery("input[name='data\\[9\\].dummy']").val(); // Search select (label)

var textStr = jQuery("#readonly_9").text(); 
// <div id="readonly_9" class="fit"><div class="auto-link" id="ext-gen1193">Hello hello</div></div>
// → Hello hello 

var htmlStr = jQuery("#readonly_9 > ul").html(); 
// <div id="readonly_7" class="fit"><ul class="readonly-select"><li>sample choice true</li></ul></div>
// → <li>sample choice true</li>

♦ Rewriting = Within the Form:val(textStr) within the Tag:text(textStr) html(htmlStr)

<script type="text/javascript">
jQuery('input[name="data\\[1\\].input"]').on('change',function(){ 
// If there is a change in the input Text value in the Form of the data item number "1"
// (Detects focusout by change)

var thisValue = jQuery(this).val();

 var myRegex = /^https:\/\/|^http:\/\//; // Begins with "http://" or "https://" (Regex)
var newValue = thisValue.replace( myRegex, "" ); // Delete matched part
// ex) "http://www.questetra.com" → "www.questetra.com"

 var newValueLc = newValue.toLowerCase(); // Lowercasing * Note that it is applied also on other than domain part

jQuery('input[name="data\\[1\\].input"]').val( newValueLc );
});
</script>

<script type="text/javascript">
jQuery('input[name="data\\[1\\].input"]').on('keypress keyup change',function(){ 
// If there is a change in the input Text value in the Form of the data item number "1"
var thisValue = jQuery(this).val();
// Split the string if the number of characters is 13 or more digits
if( thisValue.length > 13 ){
 jQuery('input[name="data\\[2\\].input"]').val( thisValue.substr(0, 6) );
 jQuery('input[name="data\\[3\\].input"]').val( thisValue.substr(6, 13) );
});
</script>

<script type="text/javascript">
jQuery('input[name="data\\[1\\].input"]').on('keypress keyup change',function(){ 
// If there is a change in the input Text value in the Form of the data item number "1"
//  Detects an input of alphanumeric by keypress, detects an input of the delete key and the backspace key by keyup
// Detects focusout by change
var thisValueLength = jQuery(this).val().length;

// Calculating the check digit if the number of characters is 13 digits
if( thisValueLength == 13 ){
 var mysum = 0;
 var thisValue = jQuery(this).val();

 for( i=1; i < 13; i++){
 mysum += parseInt( thisValue.charAt(i) ) * (i % 2 + 1);
 }

 var checkdigitnum = 9 - mysum % 9;
 var typedcd = parseInt( thisValue.charAt(0) );

// Rewriting the HTML within <p id="mymessage1"></p>
if( typedcd == checkdigitnum ){
 jQuery( '#mymessage1' ).html("OK");
 } else {
 jQuery( '#mymessage1' ).html("<font color=red>NG</font>");
 }
} else {
 jQuery( '#mymessage1' ).html("<font color=blue>Please enter 13-digit number</font>");
}
});
</script>