I'm creating a Pizza order form. Part of my project includes the ability to print a receipt which I have created successfully as a pop-up window; however, I have the window.print() function in that part of the code and it will not print the pop-up receipt, but rather the main window. Code:
I'm using window.showModalDialog but having an issue trying to set the parent window(main browser). I open modal window A which is then opens modal window B, top of modal window B onload I do window.opener.close()". My issue now is when i'm finished with B I set parent window(main browser) to a new url with window.opener.location. So my problem is modal window A the parent has been closed so window.opener.location will not work.
I have the code below in my popup window which currently brings up a blank page in the background as the main window. Instead I want the popup to come up but the original page I left is in the background as the main window. Does anyone know how I can do that with the code I currently have.
In my main window, I create a popup window. Is there a way to bring the main window back to the foreground (make the main window the focus window again) from the popup window using JS? Like from a link or a button?
I have a popup window that comes up when a user doesn't have access to a certain page within my site. The problem is when a user clicks on something the popup window comes up but the bigger sized window of that popup comes up in the background as well. I am trying to have my popup window come up while the original page I clicked from is still focused/seen in the background. This is the code I currently am using, can anyone help me with what I am missing. I have a back button but I won't need that if I want to maintain the original page in the background. Instead I will use a close button.
I am building a CMS and will have an Image browser built with it. When articles are added the will be able to open up the image browser when they find the image they want to insert I would like to send it(and ID from my database) into that textarea where the article is in(in the main window). So basically sending a value from popup to the main window(textarea). Is there a way i can do it.
I'm having a long page where there will be content to be printed.
I'm using the css using media=print to hide all the unwanted contents and using the window.print method to invoke printing.
But when i click the print button it prints only partial content upto a single page and all the remaining contents are discarded.
I wonder what may be the problem!!!
And there's another problem , i've bills to be printed in order but dont want them to be breaking in between pages .(ie a bill should be printed fully if there is enough space at the bottom or should be printed on the next page)
Hey all. I am currently putting together a test page of mine where a popup window comes up showing a coupon that I will have a link enabling them to print it simply and easily.
So I have a print page that's written in a combination of php & html. The body tag is outside the php with an onload="window.print();window.close;"
The idea behind this print page is when the print button is pressed on the parent window, it generates this child window that is specifically made larger for printing reports that people can read easily. I use css for text styles and the table "width" is longer.
All the html code inbetween the body tags is created by php using the php "Print" function. </head>
My problem is it does not print the table dimension or the font size above a certain size. When I print in landscape, which is what this page is designed for, it prints the same size as "scaled to fit" portrait. On the screen the size is correct and if I use the browser print button, it prints to the correct size.
The css works, it will make changes and will even make the text smaller just won't print over a certain size (9pt?).
What I'd like to add is add a line of code that will close the calling parent window (right now I make it visible by resizing it and clicking on a close link). I'll even settle for having to confirm the closure but, the ultimate would be that it would close by itself. Code:
I am very new at this - and have found code everywhere for pop ups and popunders, but I need both in the same place. So - I am on a main page with a link. If the user clicks the link they get a popup window (it is a specific url). When the user exits out of the popup, I want the popunder to go under the main window they were looking at (not the popup window)
If I am in my main window, I have an href link to click for the popup.html window. This works fine, and I tried to put the code into the popup.html to load the popunder upon exit. What a disaster. It loads on TOP of the main window because of course it is trying to popunder the popup.
I'm having a problem rewriting a window with a popup I made. I'm using Debian Woody with Mozilla 1.0. I can make the popups, but I cannot rewrite the original window with the new information gathered from the popup. Can someone please make some suggestions. I've got most of my information from an old copy of the Rhino book.
I have a simple page on my freebie account site that opens a popup window running index.asp on another site of mine. The code on the freebie hosted server is below. What I'd like to do is have the freebie hosted page shut down once it's opened up the child window.
I have two PHP scripts. The popup script (calendar.php) is linked from the main navigation of the website. When it is clicked, the calendar popups up and the dates are linked. For example; the 24th July 2004 would read: events.php?day=24&month=7&year=2004
However, I require this information to be passed back to the MAIN window so that it can be displayed in a full screen.
I'm trying to figure out how to close a popup window automatically when the viewer returns to the main window.
I'm presenting a series of composite pages from a drop down menu and right now all I've succeeding in doing is bringing the popup to the front when it is first opened.
If I go back to the main window and choose another link, the popup stays in the background. I don't want to open a popup for each link and if all else fails, I'd be happy with using one window if I could bring it back to focus when it is loaded.
Ideally, I'd like the popup to close when the viewer clicks back on the main window but so far no joy. I can close the popup with a link, no problem, but I'd like to do it instinctively.
Is there any way to close a window when it loses focus? If not, how do i refocus the window when a new link is selected? Code:
Can somebody tell me how I can make a popup window appear behind the main browser window by modifying the script below to do this? I would like it so the popup will load but they won't see it until they close the main window.