Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

[ Image Removed |../../index.htm#lansa/lansa050_1025.htm]
現在地: RAMP-TSガイド > 画面の拡張 > HTMLAPI スクリプト・オブジェクト > 標準レイアウト・ファンクションにより画面をジェネリックに変更する

...

Wiki Markup実行する価値のある別のジェネリック操作としては、画面からすべての "+" プロンプト・フィールドを削除し、すべてのフィールド・ラベルから末尾のドットを削除することです。 

これを実行するには、以下のようなコードを プロンプト・フィールドを削除し、すべてのフィールド・ラベルから末尾のドットを削除することです。 これを実行するには、以下のようなコードを SHARED,ApplyStandardLayout ファンクションに追加します。  


/* Get all elements between lines 3 and 22 */

...

 
 

...


var aH = HTMLAPI.getElementsinRowRange(3,22);

...


 

...


/* Hide all fields containing "+" signs and strip trailing dots from others */

...

 
        
for (i = 0; i < aH.length; i++ )

...


{
    var oH = aH

...

[i

...

]; 
 
 

...

 

...

 if ((oH != null) && (typeof(oH.tagName) != "undefined"))

...


    {
       var fIsINPUTField = ((oH.tagName == "INPUT") || (oH.tagName == "TEXTAREA"));

...


       
       if ( !(fIsINPUTField) ) /* This NOT an input field on the screen */

...


       {
          if (oH.innerText == "+") HTMLAPI.hideElement(oH);

...


          else                     HTMLAPI.stripTrailingDots(oH);
       }   
    }
  }


実行すると、サンプルの 5250 は以下のようになります。  

Image Added        \}       \}   \}   実行すると、サンプルの 5250 は以下のようになります。  !worddavaf485e25f57cd86bb5b0fc63f3f1b1cc.png|height=32,width=32!   [ !worddavaf485e25f57cd86bb5b0fc63f3f1b1cc.png|height=32,width=32! |../../index.htm#lansa/lansa050_1025.htm]