-3

I Am realy need to hidding my browser tab when program executing a lines in my php program but the browser and other tab still live

for example

<?php
function hideBrowsertab(){
    //in here program will hiding tab but browser still live
}
//action 1 bla bla bla 

//action2 bla bla 

//action 3 call hideBrowertab function
hideBrowsertab();
?>

How to hidding browser tab in action 3 ?

Alimin
  • 2,287
  • 6
  • 19
  • 31
  • i wonder how did you hide browser tab using php? as far as i know, you could [check via javascript](http://www.stepblogging.com/how-to-check-browser-tab-is-hidden-or-visible-using-jquery/) but not hiding it. and also, php runs on the server, it won't affect web browser more than defined by HTTP standard. – Bagus Tesa Dec 16 '15 at 13:29
  • browser tab or div ?? if (browser tab) {goto javascript} else if (sth === true) {show div} – Andrew Dec 16 '15 at 13:30
  • I learn jquery before and I often practicing to hide and other manipulation html element, do you have other alternative @Tezla?, how about using plugin like mozile hide tab bar visit https://addons.mozilla.org/en-us/firefox/addon/hide-tab-bar-with-one-tab/ ,. is possible to executing the following plugin in php or javascrip? – Alimin Dec 16 '15 at 13:43
  • you have only limited influence on the browser from within a page (for good reasons, both security and user experience related). as others have written, PHP is always serverside and has no direct influence on the browser. With javascript you can close a window or tap under some circumstances, see for example this question: http://stackoverflow.com/questions/19761241/window-close-and-self-close-do-not-close-the-window-in-chrome – cypherabe Dec 16 '15 at 13:51

1 Answers1

1

I don't think you can do that in php. Because your php scripts is executed on server side.

If you want to have a complex web app with a lot of user interaction you should probably look to AJAX pattern.

sonic
  • 1,894
  • 1
  • 18
  • 22