Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 5th, 2008, 03:05 PM
Nick S
Guest
 
Posts: n/a
Default Re: Closing a window

On Sep 5, 4:02 pm, Nick S <nrsut...@gmail.comwrote:
Quote:
On Sep 5, 7:17 am, Todd Cary <t...@aristesoftware.comwrote:
>
Quote:
I create a new window with
>
Quote:
onClick="openBrWindow(\'claimant_pdf.php\',\'\',\' toolbar=no,status=yes,scrollbars=no,resizable=no\' )"
>
Quote:
as part of a submit button.
>
Quote:
Now I would like to close the window in my php code if a line is
executed e.g. an echo statement. What syntax do I use to execute
window.close()?
>
Quote:
Many thanks...
>
Quote:
Todd
>
While Garlington is correct in a very literal sense, if you echo out
window.close(theWindow) you will be able to close the window if you
open it with
>
onClick="var theWindow = openBrWindow(\'claimant_pdf.php\',\'\',
\'toolbar=no,status=yes,scrollbars=no,resizable=no \')"
>
(I think) :) I've not tested it as I'm not at my PC :)
ooh wait a minute, if you're echoing out from PHP you'll be refreshing
the page and therefore losing the window handle "theWindow", I would
suggest using ajax to accomplish what you want to do in php that way
you maintain state on the page and can close the window
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles