473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Feb 27 '07 #1
5 3373
so******@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()"
Feb 27 '07 #2
so******@gmail.com wrote:
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
Feb 27 '07 #3
Mike Roetgers wrote:
so******@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
Feb 27 '07 #4
so******@gmail.com kirjoitti:
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ö
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Feb 27 '07 #5
Erwin Moller wrote:
Mike Roetgers wrote:
>so******@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
besides, js can not close the last window.

bill
Feb 28 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Jake | last post by:
Hi all I am trying to read all the navigator object elements 1. Using the navigator.length returns undefined, cant use for loop; 2.Using and array of known elements like var a =...
12
by: Jan Buchwald | last post by:
navigator.userAgent returns information about the user operting system, Browser etc. Usually you get somthing like: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) or Mozilla/4.0...
13
by: ima | last post by:
Where can I find a list of valid names for Navigator.AppName?
4
by: James P. | last post by:
Hello there, I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to...
1
by: Toma¾ Mlakar | last post by:
Hello I'am writing an ASP.NET application and would like to have a page navigator on every page. Navigator would look like this: Start page -> Page 1 -> Page 1.1. I would like as...
10
by: petermichaux | last post by:
Hi, I'm picking apart the Yahoo! UI event.js library and stripping it down to just what I need. I'm also trying to make the parts I use better. I'm stumped on how to fix the code for the...
3
by: Aaron Gray | last post by:
Is 'navigator.mimeTypes' supported on Windows IE ? navigator.mimeTypes.length is giving me 0 Many thanks in advance, Aaron
3
by: Rick | last post by:
VS 2005 The short version: How can I set the enabled state of a button depending on if a strongly-typed datatable has a DeleteCommand? *************************** The long version:
1
by: qazplm114477 | last post by:
hello, I have notice that when i drag a table/column from my dataset onto my form, VS2008 automatically populates the form with a binding navigator and some other stuff like the tableadapters and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.