|
Posted by Erwin Moller on 02/27/07 15:16
Mike Roetgers wrote:
> sousimou@gmail.com schrieb:
>> 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
Navigation:
[Reply to this message]
|