Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2007, 01:45 PM
sousimou@gmail.com
Guest
 
Posts: n/a
Default PHP quit navigator

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
Default 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
Default 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
Default 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
Default 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
Default 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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles