javascript browser window properties
- Started
- Last post
- 3 Responses
- fifty50
How can you change a browser window's properties when a page is loaded? i already know:
window.resizeTo(xxx,xxx)
it automatically resizes the window when the page loads, but how can you make it so that the window has other properties changed, like hiding the status bar, location bar, favourites bar, etc...
- instantok0
window.open("http://www.w3school... location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
learn lots here: http://www.w3schools.com/js/js_e…
- fifty500
I meant I want to put it in a tag in the URL that's already open, forcing the window to not only resize, but also hide it's toolbar, etc.
it's not possible for me to define a LINK as javascript with the window properties in it, so i've gotta make the properties in the window once it opens
- fifty500
alright i figured it out :P
problem was i wanted a popup confirmation window to appear when i clicked "submit" at the end of a form, then the PHP script would determine what kind of confirmation it would display, either "incomplete", "invalid", or "confirmed"...
so in the form tag, i placed the action pointing towards the PHP script, an an "onSubmit" tag with a javascript opening a window with the appropriate window properties. it was such an obvious solution, but since it's friday afternoon it took me a little longer than it should have to figure it out :P