I have an iframe with name "item-creation" with "submit" button which calles "item/create" (Item controller actionCreate).
If everything is fine, I need to save item ($item->save) and then close iframe.
I do not understand how to close this iframe. I need somehow call clientside scrpt from server side, but what view should I render. I am confused…
public function actionAdd()
{
$item = new ItemModel();
if(isset($_POST['ItemModel']))
{
$item->attributes=$_POST['ItemModel'];
if ($item->save())
{
// close iFrame //<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' /> how to do this
}
}
$this->renderPartial('ItemView', array(
'model'=>$item,
));
}
I am a newby…
Thanks in a advance.