Quantcast
Channel: SCN : All Content - SAP GUI
Viewing all articles
Browse latest Browse all 3616

Screen Personas 2.0 Enable/Disable script button in Javascript

$
0
0

Hi,

 

Has anyone tried enabling or disabling script buttons on a flavor using Javascript. I have two script buttons,

  1. The first one (Button1) searches for a contract based on the contract id provided by the user in a text box. (So, the script triggers the transaction me33k, fetches and displays the relevant fields in the flavor)
  2. Now, based on whether the contract is present in the system the user needs to click another script button (Button2) which will allow him to create an order. Currently the button is disabled (ScriptButton.IsEnabled = false in the Properties menu).

 

In the Button1 script towards the end, I need to enable Button2 is a contract is found. So in the Button1 script, at the final step I try to calculate in JS and write the following JS code,

var args.btn2id = document.getElementById("Personas/blahblahblah");

args.btn2id.disabled = false;

 

But this is never works. And I have noticed that the control id does not return the control object in Javascript (so, args.btn2id is always null) and I tried removing the '/' and various other options.

 

Has anyone ever tried to enable/disable buttons in Personas? Is it even possible?

 

Abhijeet


Viewing all articles
Browse latest Browse all 3616


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>