Button inside a frame not working

I have this situation

How can I write the button.press even for OK button?

Instance name of the popup window=addprod1
Instance name of Ok=pop_addprod_ok

I tried this in the action part of OK

on(release)
{
trace(input_pname.text);
var anObject= {id:6, available:true, item:input_pname.text, quantity: 3, price: input_pvalue.text};
_root.grid.addItem(anObject);
//grid.addItem(anObject);…even this doesnt works!
this._visible=0;
}

trace works but no data is being added to the Grid

When in my actionscript layer I write
pop_addprod_ok.press=function()
{
trace(“Here”);
}

It is not at all called
Can anyone please explain what is going wrong?
Thanks