Getting Another Object's ID with Colliders

Hello, Is this possible ? I mean, I got a collider only object and i want to get it’s name when a object interacts with it.

var IDBox : GameObject;

var name : String;

function ObjectNameController () {

if(IDBox.collider){
name = IDBox.collider.gameObject.name.ToString();
}

}

Something Like This

Are you aware of collision and/or trigger events ?

Just an example from the documentation : Unity - Scripting API: Collider.OnCollisionEnter(Collision)

Or you can get the basic idea from this video : http://unity3d.com/learn/tutorials/modules/beginner/physics/on-collision-enter