How do I make a page a certain size when it is opened? JF
How do I make a page a certain size when it is opened? JF
A page or a window?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
The window. I need it to be full screen when it is opened. Thanks for the help, JF
Code:window.open('http://www.url.com/', '', 'width=' + screen.width + ', height=' + screen.height);
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Do I put it into srcipt tags?
Ok here is what I want to do. I have a work form and I need it to be a certain size when they click on the hyperlink. Do I put this with the hyperlink or on the page that is going to be opened? Thanks for the help, JF
Here is one good way to do it:
HTML Code:<a href="workform.htm" onclick="window.open(this.href, '','width='+screen.availWidth+', height='+screen.availHeight+', top=0, left=0');return false;">Work Form</a>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
When I put that In it makes the window full screen even over the task bar. It also takes away the scroll bar on the side. I would like it to still have the scroll bar on the side and not cover up the task bar on the bottom. JF
That's odd, that is what screen.avail is for. This used to work for IE and still does for FF. It is still better in IE than just plain screen, just not better enough. To overcome this in IE, put this in the head of the page:
To add back scrollbar(s) and take advantage of our new adjust variables:Code:<script type="text/javascript"> var hAdjust=document.all? 27 : 0; var wAdjust=document.all? 4 : 0; </script>
HTML Code:<a href="workform.htm" onclick="window.open(this.href, '','width='+[screen.availWidth-wAdjust]+', height='+[screen.availHeight-hAdjust]+', top=0, left=0, scrollbars=yes');return false;">Work Form</a>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
A 4px wide scrollbar?Originally Posted by John
![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks