AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Java web form builder4/9/2023 ![]() ![]() You use JavaScript to do:ĭocument.forms_applet.raiseEvent(event_name, payload) There is new functionality available on the embedded Forms object in the DOM (Document Object Model) tree. You can also allow JavaScript calls into Oracle Forms by using JavaScript in the Web page that hosts the Forms applet. To get the value of the outside field and assign it to the inside field, you could write the following PL/SQL code:ĭocument.getElementById("outside_field_id").value You could also write a function in the Web page:ĭocument.getElementById(field_id).value=myvalue Using double quotes inside the expression works without having to use escape sequences. Notice that the PL/SQL string must use single quotes while JavaScript is flexible enough to use single or double quotes. To set the value of an HTML text item with the ID outside_field_id to the value of the Forms field called inside, you could write this PL/SQL code:ĭocument.getElementById("outside_field_id").value=' The additional network trip that is required to carry the return value from the Forms client to the Forms Services is eliminated. ![]() If your application does not need a return value, use web.javascript_eval_expr. Both web.javascript_eval_expr and web.javascript_eval_function have the same functionality except that javascript_eval_expr does not send any return value from the Forms client to the Forms Services. The second call, web.javascript_eval_function is a function and returns a varchar2 value. If the target argument is null, then it is executed in the page or frame in which the Forms applet is embedded. The expression is executed, using LiveConnect's JSObject.eval() method, in the context of the page or frame that is named in the target argument. The expression can be a call to a function that is defined in the target page or any valid JavaScript expression that can be executed on the target page, for example, document.bgColor='red'. This legal JavaScript expression is interpreted in the Web page in which the Forms applet is embedded. The first call web.javascript_eval_expr is a procedure which takes two arguments: an expression and a target, both of data type varchar2. Two new calls are available in the web Built-in package: Description of "Figure 6-1 Oracle Forms and JavaScript" ![]()
0 Comments
Read More
Leave a Reply. |