function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sgoremasgorema 

Executing an scontrol from another scontrol

Hello...I am assuming it is possible to call an scontrol from another scontrol? If so, what is the correct syntax? I am using ajax beta3.3.  thanks in advance!
sfdcfoxsfdcfox
First, you should update to the latest version; the beta toolkit was never intended for production. The syntax has changed since the beta and, if the beta stops working, you'd be forced to re-write all your code anyways. And it's not supported, so that's a major incentive.

Anyways, you can call an scontrol from another by including it explicitly:

Code:
<script src="{!SControl.Scontrol_Name}" type="text/javascript">
</script>
In this way, you can have as many S-Controls as you need.