PHP-JAVASCRIPT PROBLEM...

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
cyberdesi
Forum Newbie
Posts: 1
Joined: Mon Jul 12, 2010 4:36 pm

PHP-JAVASCRIPT PROBLEM...

Post by cyberdesi »

I have a question concerning PHP n javascript.
Here is the requirement. When a user click on a short cut of a page on desktop, 2 fields in that shortcut icon(which is a index.php web page) will be automatically filled with data from DB. and the index.php automatically calls another php page index_1.php by using action = " ", method = post; When I try to close the index_1.php (in Firefox) by using CLOSE button (created by me) I can NOT do that. Is there anyway in PHP to close the index_1.php which will automatically close index.php page as well. OR which is the better way 2 achieve this? Javascript does not seem working.

TIA
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: PHP-JAVASCRIPT PROBLEM...

Post by Jade »

I don't think you can submit the form and capture the window unless you're using Ajax. If you remove the $_POST and instead use $_GET you can use the javascript window.opener to close dependent (child) windows: http://www.webreference.com/js/tutorial1/reference.html
Post Reply