Thank you Kasyan.
I have one more question for you.
I created a edittext field using scriptUI and i want to get the data from that textfield.
I use variable editcontets to get the data but in this case it not working. I am posting my script. Please let me know if there is any thing wrong i am doing.
var g3 = myDlg.msgPnl1.add( "group" );
myDlg.msgPnl1.titleSt = g3.add('statictext', undefined, 'Name: ');
myDlg.msgPnl1.titleEt = g3.add('edittext', undefined,'Test');
var amit = myDlg.msgPnl1.titleEt.editContents;
alert(amit);
myDlg.msgPnl1.create = g3.add('button', undefined, 'Create');
myDlg.msgPnl1.titleSt = g3.add('statictext', undefined, ' ');
when you run the script whatevery data in that text field will come o the variable amit.
When i am trying to run this script i am getting alert as "undefined".
I do not why please help me in this matter as well.
Thank you,