473,407 Members | 2,676 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,407 software developers and data experts.

self closing

I didn't find the answer in the FAQ at php.net...

I have a button on parent.php that launches a page (child.php) in a new
window. Child.php does some database activity and is silent (unless
there is an error). I want this child.php to close itself if there are
no errors. How can I do this?

Mark
Mar 23 '06 #1
3 2766
Rainman <na**@yourdomain.com> wrote in news:GDyUf.36085$g91.27014
@tornado.ohiordc.rr.com:
I didn't find the answer in the FAQ at php.net...

I have a button on parent.php that launches a page (child.php) in a new
window. Child.php does some database activity and is silent (unless
there is an error). I want this child.php to close itself if there are
no errors. How can I do this?


PHP cannot close windows.
However, you can use PHP to conditionally write javascript to do it.
--
Karl Groves
http://karlcore.com
http://chevelle.karlcore.com

Accessibility Discussion List: http://smallerurl.com/?id=6p764du
Mar 23 '06 #2

Karl Groves wrote:
Rainman <na**@yourdomain.com> wrote in news:GDyUf.36085$g91.27014
@tornado.ohiordc.rr.com:
I didn't find the answer in the FAQ at php.net...

I have a button on parent.php that launches a page (child.php) in a new
window. Child.php does some database activity and is silent (unless
there is an error). I want this child.php to close itself if there are
no errors. How can I do this?


PHP cannot close windows.


Said Javascript would look like

<script language="Javascript">
window.close();
</script>

or,

echo "<script language=\"Javascript\">";
echo " window.close();";
echo "</script>";
or do this and wait until the user gets bored and closes the browser
themselves, or IE crashes.

while (true)
{
echo "x";
}

Mar 23 '06 #3
I think, it could be better if you just go to the child.php, do your
database activity and, if done, return with a header(Location : '') to
the parent.php

While your page has no output data, you don't really have to open it in
a new window.

Mar 23 '06 #4

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

Similar topics

5
by: Arthur T. Murray | last post by:
http://www.scn.org/~mentifex/jsaimind.html is a free, public-domain AI in JavaScript that may be copied to your Web site with your own changes. Freshly updated and modified from the AI Mind-1.1...
1
by: Steven | last post by:
I have a webpage where the user enters parameters for a report. This page then post to a 2nd page. In this second page is the code to create the report. The output of the page when it is...
0
by: Nik Coughlin | last post by:
Hi, How would I go about suppressing self closing tags in form fields etc. so that my HTML 4.01 Strict pages validate? Is there an option I can set in Web.Config? Do I need to parse the page...
4
by: Mark Rae | last post by:
Hi, Is there a way to prevent ASP.NET 2 from stripping off the self-closing meta tags...? E.g. <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" /> is turned into
1
by: mikepmyers | last post by:
I've done some research online and turned up with results that did not sit well with me. I’m using the System.Xml.XslCompiledTransform class as recommended by MS; however, it’s creating self-closing...
1
by: oliver gargour | last post by:
Hello, I am using the following code in a popup. <html> <head> <title></title> </head> <body onLoad="this.focus();" onblur="self.close"> <form action="" method="get">
4
by: David Cartwright | last post by:
Hi, I have a VB.NET (VS2005, .NET 2.0) application producing an XML file which is then used by a third-party product. It turns out the latter doesn't like self-closing tags (i.e. it would rather...
1
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The...
1
by: Nathan Sokalski | last post by:
I am using the System.Web.UI.HtmlTextWriter, and would like to create tags that are self-closing (such as <tagname />). The RenderBeginTag method does not offer the option of making a self-closing...
1
by: krunaldsoni | last post by:
Let me give you my problem statement: <positiondata > <touchpad reportedFingers="2" /> <timestamp user="Dev" time="1252088979018" /> <reported2d x="447" y="232" z="31" w="1" finger="0"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.