โดย thatsawan » 27/09/2015 8:22 pm
สิ่งสำคัญที่ทำให้พลาดกันได้ data-refresh="true" ถ้าไม่ใส่ จะไม่สามารถ redirect ได้ ค่ะ (พลาดรอบ 2 ^^)
โค้ด: เลือกทั้งหมด
<a href="/link.php?id=4" data-ajax="true" data-refresh="true">link</a>
thatsawan เขียน:meta_refresh(3, append_sid("{$this->root_path}index.$this->php_ext"));
trigger_error($data[$value]);
thatsawan เขียน:อีกวิธี phpbb_alert
โค้ด: เลือกทั้งหมด
$url = 'https://www.mindphp.com/forums';
$json_response = new \phpbb\json_response;
$json_response->send(array(
//'user_id' => $user_id,
//'username' => $username,
'ESSAGE_BODY' => $this->template->assign_display('show_all.html'),//$this->template->assign_display('body'),
'MESSAGE_TITLE' => '<div class="title_show_all">'.$this->user->lang['USER_ALL_LIKE'].'</div>',
'MESSAGE_TEXT' => $user_show_all,
'REFRESH_DATA' => array(
'time' => 3,
'url' => $url,
)
));
โค้ด: เลือกทั้งหมด
'REFRESH_DATA' => array(
'time' => 3,
'url' => $url,
)
สิ่งสำคัญที่ทำให้พลาดกันได้ data-refresh="true" ถ้าไม่ใส่ จะไม่สามารถ redirect ได้ ค่ะ (พลาดรอบ 2 ^^)
[code=php]<a href="/link.php?id=4" data-ajax="true" data-refresh="true">link</a> [/code]
[quote="thatsawan"]meta_refresh(3, append_sid("{$this->root_path}index.$this->php_ext"));
trigger_error($data[$value]); [/quote]
[quote="thatsawan"]อีกวิธี phpbb_alert
[code=php] $url = 'https://www.mindphp.com/forums';
$json_response = new \phpbb\json_response;
$json_response->send(array(
//'user_id' => $user_id,
//'username' => $username,
'ESSAGE_BODY' => $this->template->assign_display('show_all.html'),//$this->template->assign_display('body'),
'MESSAGE_TITLE' => '<div class="title_show_all">'.$this->user->lang['USER_ALL_LIKE'].'</div>',
'MESSAGE_TEXT' => $user_show_all,
'REFRESH_DATA' => array(
'time' => 3,
'url' => $url,
)
));[/code]
[code=php] 'REFRESH_DATA' => array(
'time' => 3,
'url' => $url,
)[/code][/quote]