Methods attached to fields not firing

I have a text field and media field on my list (non editable). I have attached methods to those fields. But these methods are not firing.

FYI. if the text field diplay tpe is set to “Text_Field” the script is firing. But if it’s set to text_area it’s not firing. For design reasons I have set the display type to Text_Area

Can you please look at this issue?

Thanks
Ahmad

on which event is it suppose to fire? onFocusGained/Lost etc..?
what should the script do? (do you have sample code?)

actually I have attached the script on “onAction” event.

The script does nothing but “going to a different form”

buttName = application.getMethodTriggerElementName() + "";
plugins.dialogs.showErrorDialog( "",  buttName)

switch (buttName) 
{ 
case "Gallery_Form" : 
      forms.Gallery_Form.controller.show();
      break; 

}

even the alert is not coming

on text area’s you don’t have an onAction
because the onAction on a textfield is the enter key.
But the enter key on a textarea really just inserts an linefeed

Is there any work around to attach a method to the text area field (non editable). I really want to make it as a text area for the design work arounds (it will have a flat appearance under Kunsoff LAF).

Also what about attaching a method to the media field?

Thanks
Ahmad

but what kind of action do you want.
What should a user supposed to do?

onAction will not work
but onFocusGained or lost should work al fine.

so can’t you use onFocusGained for youre non editable text area?