Reputation: 1034
There is some code that has been in place on our website for nearly ten years, used to popup open a window with results of an operation. It operates by just echoing the code for a simple window, shown below. There is no javascript.
Here is the PHP code that creates the window:
echo "<body>";
echo '<p>Profile sent successfully to your email.</p>';
echo '<br /><input type="button" value="Close Window" onclick="window.close();" />';
I would like to add some text to the window and style it some without replacing it with a full redesign. However, I don't see any way that the size of the window is controlled. I have tried adding some styles to control the window size, but no matter what the window opens at a fixed size as shown here of about 400px by 175px:
When I add text, it pushes down below the seemingly fixed size of the window.
So how can the size and styles of such a window be controlled?
Upvotes: 3
Views: 3908
Reputation: 184
As Jeffrey said, There is definately a piece of JavaScript sitting somewhere that opens the window by loading the content from this PHP page.
Look for something like this somewhere in your JS files:
window.open("/print-email-profile.php?mo...");
Your code doesn't seem to have a complex structure as there is no class/id or any scoping structure.
So, by a any IDE, you can just search for "window.open" and inspect the results.
After you find that JS window.open(), refer to this link to learn how you may change the size and location of this pop-up window : W3Schools on window.open()
Upvotes: 2