how to close window without JabbaScript

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

how to close window without JabbaScript

Post by Milan »

Is there a php function that will close the current window?

I would like to window to be closed after user upload the file but i dont want to use button with JavaScript for it, did anyone had a same problem?

thanks.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Code: Select all

<a onClick="window.close();" href="#">Close Window</a>
Something like that, just google it. "close window javascript"
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

Post by Milan »

I dont want to be rude, but did you even read my question?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: how to close window without JabbaScript

Post by RobertGonzalez »

Milan wrote:Is there a php function that will close the current window?

I would like to window to be closed after user upload the file but i dont want to use button with JavaScript for it, did anyone had a same problem?

thanks.
PHP is a server-side application. Closing windows always takes place on the client-side. JavaScript is client side technology, so you really should look into that.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Sorry I saw the Jabbascript part but missed the word without. I think your out of luck.
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

Re: how to close window without JabbaScript

Post by Milan »

Everah wrote:
Milan wrote:Is there a php function that will close the current window?

I would like to window to be closed after user upload the file but i dont want to use button with JavaScript for it, did anyone had a same problem?

thanks.
PHP is a server-side application. Closing windows always takes place on the client-side. JavaScript is client side technology, so you really should look into that.
All makes sense now, thanks a lot to both of you.
Post Reply