enable variable on child game object

apologies I know this is a widely discussed topic unfortunately I cant seem to implement any of the ideas to a working formula for my situation.

I have a script called ‘tog.js’ which is attached to a mesh called ‘globe’.
there is a mesh that is a child of ‘globe’ called (due to importing) ‘__Russia’
on ‘__Russia’ there is a script called ‘writing’
in ‘writing’ there is a variable called ‘submitPressed’ which i would like to enable/disable from the ‘tog’ script. i.e. while the toggle in tog is enabled the variable submitPressed is disabled.

this is my latest attempt i have tried many options any help will be greatly appreciated

function Start (){
  var country = GameObject.Find("globe/__Russia");
  var script : writing = GetComponent(writing);
var activate = country.GetComponent(writing);

function OnGUI () {
toggleImg = GUI.Toggle(Rect(920, 650, 100, 110), toggleImg, plugTexture,"button");
		if (toggleImg==true){
		activate.submitPressed.enabled = false;

i dont want to make them all variables but i get errors if i don’t. closest i got was making the __Russia mesh inactive
ive made scripts to deactivate scripts but not the variables inside them

(not great at javascript but)

var activate = GameObject.Find ("globe/_Russia").getComponent("writing") as writing;
if (toggleImg)
acitivate.submitPressed = false;  //Im guessing submitPressed is a bool?

Avoid using GameObject.Find() whenever possible. It will search all objects in your entire scene. In your case, you only need to search within the child objects of globe.

In the update function of your tog script, use this…

this.GetComponentInChildren(writing).submitPressed = (toggleImg == false);

The above will search for the first instance of any writing component found in any child object and assign the opposite of togImg to submitPressed.

If you may have more than one child with a writing component, then you will need to use something like…

this.transform.FindChild("_Russia").GetComponent(writing).submitPressed = (toggleImg == false);