Triggering FieldChange from JavaScript

preview_player
Показать описание
Trigger event #PeopleSoft processing when someone presses the enter key! Here is the scenario: your users scan values with a barcode scanner, and that scanner automatically sends the enter key on completion. Unfortunately, PeopleSoft doesn't respond to the enter key. In this episode, we'll show you how to inject a JavaScript fragment to trigger FieldChange and other event processing when the browser receives the enter key press.

JavaScript used in this episode:

(function () {
/* Replace id with the ID of the element that has a new value */
var id = "JSM_TEST_WRK_ROLENAME";

}

/* Setup any PeopleSoft-specific change handling */

/* Trigger Ajax submission */
/* %FormName is a PeopleSoft Meta-HTML variable */
submitAction_%FormName(document.%FormName, id);
}
}
}());

PeopleCode:
AddJavaScript(HTML.JSM_TRIGGER_FC_JS);

Рекомендации по теме
Комментарии
Автор

I had this issue on a page where the enter key wouldn’t trigger the FieldChange PeopleCode. In my case, I added a hidden button that didn’t do anything and set it to be activated by the enter key. Of course, I did have to add the button to my record for the page but nothing too hard.

tigger
Автор

We have a request to add an isolated customization to a delivered fluid page for Direct Deposit. When the user adds a routing number the request is to have the bank name and address populate like it does in the DIRECT_DEPOSIT component. The sub page where the add account is done does not have a drop zone configured for it. Is there a way to use java script to accomplish this request?

stevestlaurent