Does anyone know how to open a window and have it close by itself? You
may ask why, but here it is. I want to have it open (a php script), run
that script, and then close itself.
I have an application that is a huge AJAX framework app. There appears
to be some interaction between that and the mail sending software I
have. I want to send email with a file attached. The software I am
using for that is htmlMimeMail5 (php5). Since I know the parameters, I
simply want to run that php script outside of AJAX, but I don't want to
leave open windows. A quick blast open, send, close is OK.
I know that window.open opens the window and window.close closes it. 4 1782
sheldonlg wrote on 11 jun 2008 in comp.lang.javascript :
Does anyone know how to open a window and have it close by itself? You
may ask why, but here it is. I want to have it open (a php script), run
that script, and then close itself.
I have an application that is a huge AJAX framework app. There appears
to be some interaction between that and the mail sending software I
have. I want to send email with a file attached. The software I am
using for that is htmlMimeMail5 (php5). Since I know the parameters, I
simply want to run that php script outside of AJAX, but I don't want to
leave open windows. A quick blast open, send, close is OK.
I know that window.open opens the window and window.close closes it.
Why would you want a window?
You do not need any window to run a server script.
<http://www.jibbering.com/faq/#FAQ4_34>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
sheldonlg wrote:
Does anyone know how to open a window and have it close by itself? You
may ask why, but here it is. I want to have it open (a php script), run
that script, and then close itself.
Let's say you have a window A.
It could execute a script to open window B which is pointing at your PHP
script.
Once that PHP script is complete, it can serve a simple HTML page, which
includes a Javascript script to close itself.
But, that means that you have 2 windows, running 2 separate scripts. Not
a very elegant solution.
This task seems perfectly suited to AJAX. I'm surprised that you're
having 'interaction' issues between your AJAX framework and a back-end
PHP script.
It seems more likely that your AJAX framework is simply not sending all
the relevant detail to the PHP script...
Evertjan. wrote:
sheldonlg wrote on 11 jun 2008 in comp.lang.javascript:
>Does anyone know how to open a window and have it close by itself? You may ask why, but here it is. I want to have it open (a php script), run that script, and then close itself.
I have an application that is a huge AJAX framework app. There appears to be some interaction between that and the mail sending software I have. I want to send email with a file attached. The software I am using for that is htmlMimeMail5 (php5). Since I know the parameters, I simply want to run that php script outside of AJAX, but I don't want to leave open windows. A quick blast open, send, close is OK.
I know that window.open opens the window and window.close closes it.
Why would you want a window?
You do not need any window to run a server script.
<http://www.jibbering.com/faq/#FAQ4_34>
Thanks. That is what I was looking for. I didn't know this about
javascript (still learning js).
"You trigger a server-side script by setting any object's URL. For
example a frame, window, or an Image. An image will also "swallow" the
data sent back by the server, so that they will not be visible anywhere."
Thanks.
Dan Rumney wrote:
sheldonlg wrote:
>Does anyone know how to open a window and have it close by itself? You may ask why, but here it is. I want to have it open (a php script), run that script, and then close itself.
Let's say you have a window A.
It could execute a script to open window B which is pointing at your PHP
script.
Once that PHP script is complete, it can serve a simple HTML page, which
includes a Javascript script to close itself.
But, that means that you have 2 windows, running 2 separate scripts. Not
a very elegant solution.
This task seems perfectly suited to AJAX. I'm surprised that you're
having 'interaction' issues between your AJAX framework and a back-end
PHP script.
It seems more likely that your AJAX framework is simply not sending all
the relevant detail to the PHP script...
The code for the email works fine when used in a straight php script. I
am guessing that it is the interaction. I know I had problems with the
interaction when I wanted to use code to write an Excel file. I got
around that by simply having the generator bypass the black box we use
for handling all the AJAX calls. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Albretch |
last post by:
Hi,
client wants for a window with no toolbars to open (technical and
'esthetical' reasons) after the window, user clicks on, is being
closed.
I told them about security settings in browsers...
|
by: Christopher Benson-Manica |
last post by:
I have the following situation: Page A opens a window named 'foo'.
Page A then reloads itself. Is there a way for the reloaded Page A to
determine whether there is an open window named 'foo',...
|
by: Roger Withnell |
last post by:
I open a new window from the current window to display maps.
Several maps of different sizes can be displayed. The function is given the
size of the map and adjusts the window size accordingly....
|
by: ldan |
last post by:
Hi everybody,
I would not consider myself an expert in javascript - but so far
whatever I know, helped me reaching my goals. Recently I started to
experience a lot of javascript errors related...
|
by: Csaba Gabor |
last post by:
Up until a few weeks ago, javascript code like
window.open("http://mydomain.com", "windowName");
would always bring my new or reused window to the top, with focus.
Lately, Firefox (Deer park...
|
by: Buddha Pest |
last post by:
The 1st window opens the 2nd window. The 2nd window opens the 3rd window.
From the 3rd window, how do I close the 3rd and 2nd windows then change the
URL of the 1st window? Thanks.
|
by: Dave |
last post by:
For some reason, the below lines only work on select machines. All
machines are running IE6. IE SP's and OS's vary. When it doesn't
work, default.aspx (the page that this code is in) opens and...
|
by: Socrates |
last post by:
Hi - Have tried for half and hour to get this script to work:
I am trying to close the parent window while opening a centred new
child window
I would be grateful if someone could correct the...
|
by: Toccoa |
last post by:
After considerable googling - I mean searching with Google(r) - I
could not find javascript on a button or <a href=... to close a
window in the latest versions of IE and FireFox.
There seemed...
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |