Hello, let's continue talking about JavaScript. In this video, I will show you how you can invoke a button action from JavaScript. So for example, here, we have two buttons, one and two. If you want to invoke this bottom bot using JavaScript, for any situation, your ADF application, you want to call this button from JavaScript. You don't want the user come and press on the button to execute the code behind it. You can do it using JavaScript.
So let us now try to take this as the other component here. We can call it invoke bottom one. Okay, so in the bottom one, let us create an action. So let's get into bien. Muy bien. Muy bien.
You don't pin okay proton on action, but not action. And let us write some just system out print line and in button one action. Okay. So let us here in the JavaScript write a function which should invoke the bottom one. So here's the function called press bottom and I will find a component by ID and I will give the command button ID. So, I need to call button one.
So as it is B one, so I send here P one and after I get this I will just say partial Submit. So this is only simple code just to line gets a component and you can Marisa cola Bhatia submit for this coupon we can call this pretty spot on JavaScript function from this in both tickets so let us so let us add here double click pretty spot. Okay, so once I double click over this input thickest, this function will be called and once this function is called it will press on the P one but actually in all my life in EDF development, I use this situation only in one time. I create a hidden bottom with a visible defaults. And in some situations a client asked to make some, if he did some changes in the beach, he won't want to execute some complex code, or at this complex code in the bottom action, and is a JavaScript I call it using this bottom wisdom java script.
So depending on the situation you if application or your business or customer requirement, at least you know, something exists that you can call bottom using JavaScript. So from the bottom action in back being you can do whatever you want, write any code, connect to the database, call loop surface, do whatever you want. And it makes this bottom maybe visible faults. And you can call this bottom from JavaScript after the user clicks somewhere or mouse over somewhere. You can call this function, JavaScript function and JavaScript function will print support. So let us know try to run and check this Okay, Now this is button one.
So as you can see put on one here just double click here you will find little bottle one button one is clicked Can you have a look see? So if you if you have a look here you will find it is calling the action was this spot again double click this callings actions. This is how you can invoke one photon or any button or any link in your PDF application from the JavaScript by writing just two lines in the JavaScript function and it will get the button or link watch what the window what actually you want to get. component and rights is it if action event queue and get component component to get a partial Submit. Nikita video I will go for another thing in JavaScript. So see you in activity.