Connecting Tech Pros Worldwide Help | Site Map

PHP quit navigator

  #1  
Old February 27th, 2007, 01:45 PM
sousimou@gmail.com
Guest
 
Posts: n/a
i want to create an application web by PHP.
i want to create un command buttum whit must close de navigator
(internet explorer, mosilla, ...)
can you help me

  #2  
Old February 27th, 2007, 01:55 PM
Mike Roetgers
Guest
 
Posts: n/a

re: PHP quit navigator


sousimou@gmail.com schrieb:
Quote:
i want to create an application web by PHP.
i want to create un command buttum whit must close de navigator
(internet explorer, mosilla, ...)
can you help me
>
PHP is a server-side scripting language, so it can't close the browser
on the client. You are looking for javascript.
I'm not really into this js-thing, but this should work:
OnClick="javascript:window.close()"
  #3  
Old February 27th, 2007, 01:55 PM
bill
Guest
 
Posts: n/a

re: PHP quit navigator


sousimou@gmail.com wrote:
Quote:
i want to create an application web by PHP.
i want to create un command buttum whit must close de navigator
(internet explorer, mosilla, ...)
can you help me
>
not possible for security reasons.

bill
  #4  
Old February 27th, 2007, 03:25 PM
Erwin Moller
Guest
 
Posts: n/a

re: PHP quit navigator


Mike Roetgers wrote:
Quote:
sousimou@gmail.com schrieb:
Quote:
>i want to create an application web by PHP.
>i want to create un command buttum whit must close de navigator
>(internet explorer, mosilla, ...)
>can you help me
>>
PHP is a server-side scripting language, so it can't close the browser
on the client. You are looking for javascript.
I'm not really into this js-thing, but this should work:
OnClick="javascript:window.close()"
Good idea, but bad JS. (Well you told us you are not into it. :))

The 'javascript:' thingy is called pseudo protocol, and can be used in
hyperlinks, allthough not advisable because the link will fail in JS
challanged browsers.
When you use an eventhandler (like the onClick) the browser knows it is JS,
so this is enough: OnClick="window.close();"

Regards,
Erwin Moller
  #5  
Old February 27th, 2007, 09:15 PM
Kimmo Laine
Guest
 
Posts: n/a

re: PHP quit navigator


sousimou@gmail.com kirjoitti:
Quote:
i want to create an application web by PHP.
i want to create un command buttum whit must close de navigator
(internet explorer, mosilla, ...)
can you help me
>
I think it's safe to assume all browser already have an 'X' button of
some sort that would close the window, or some other means for closing
the browser. Adding another button will only create confusion.

--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
  #6  
Old February 28th, 2007, 01:55 PM
bill
Guest
 
Posts: n/a

re: PHP quit navigator


Erwin Moller wrote:
Quote:
Mike Roetgers wrote:
>
Quote:
>sousimou@gmail.com schrieb:
Quote:
>>i want to create an application web by PHP.
>>i want to create un command buttum whit must close de navigator
>>(internet explorer, mosilla, ...)
>>can you help me
>>>
>PHP is a server-side scripting language, so it can't close the browser
>on the client. You are looking for javascript.
>I'm not really into this js-thing, but this should work:
>OnClick="javascript:window.close()"
>
Good idea, but bad JS. (Well you told us you are not into it. :))
>
The 'javascript:' thingy is called pseudo protocol, and can be used in
hyperlinks, allthough not advisable because the link will fail in JS
challanged browsers.
When you use an eventhandler (like the onClick) the browser knows it is JS,
so this is enough: OnClick="window.close();"
>
Regards,
Erwin Moller
besides, js can not close the last window.

bill
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
serialized XMLHttpRequests Eric S Johansson answers 20 January 28th, 2006 08:45 PM
Making a shoutbox from phpMyChat |-|erc answers 0 July 17th, 2005 06:16 AM