Maximising a new window
Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.
Maximising a new window
#1
Posted 01 August 2006 - 05:13 AM
<a href="pic1.html" target="_blank">
<img src="building1.JPG" width="125" height="125" border="0"></a>
How do I make it so the window is maximised on opening?
#2
Posted 01 August 2006 - 05:30 AM
To be honest, you should be able to trust that your visitors are savvy enough to want to maximise the window themselves if they need to. 99.99% of people know how to do this and many people will be confused or annoyed if you try to 'take control' and do it for them.
However, if you're sure you want to give it a go, then try the following code:
<script language="JavaScript"><!--
function maximiseWindow(winRef) {
if (window.screen) {
winRef.moveTo(0,0);
winRef.outerHeight = screen.availHeight;
winRef.outerWidth = screen.availWidth;
}
}
function alterWindow(winRef) {
maximiseWindow(winRef);
winRef.focus();
}
var windowHandle = window.open('a.html','winname');
setTimeout('alterWindow(windowHandle)', 1);
//--></script>
That Javascript code will open a new window, load a.html into it and maximise it. You could turn it into a function quite easily.
However bear in mind that this method will probably be detected and blocked by many popup blockers. I think it would be safer simply to trust your visitors to maximise the window themselves, or simply keep the pictures you open in the same window.
#3
Posted 01 August 2006 - 05:34 AM
#4
Posted 01 August 2006 - 04:23 PM
<a href="java script:void(0)" onclick="window.open('link','linkname','height=xx,width=xx,scrollbars,location,menubar,resizable,toolbar')">link</a>
scrollbars,location,menubar,resizable,toolbar are optional
I never tried it, but you can do this
width=100% height=100%
#5
Posted 01 August 2006 - 08:48 PM
http://www.huddletog...ects/lightbox2/
#6
Posted 02 August 2006 - 02:14 AM
#7
Posted 02 August 2006 - 05:26 AM
#8
Posted 02 August 2006 - 07:39 AM
I blogged about them here in April
Sidenote: we don't know the meaning of the word lazy as designers do we.
#9
Posted 02 August 2006 - 08:39 AM
#10
#11
Posted 03 August 2006 - 03:19 PM
#12
Posted 03 August 2006 - 05:17 PM
#13
#14
Posted 15 August 2006 - 11:56 AM
For me personally if a picture is bigger than the browser window. I personally would have it automatically resize. Especially if I wanted to view lots of photos in the gallery.
Have you thought about using something like Gallery? (http://gallery.sf.net)
Good luck with it anyway
#15
Posted 16 August 2006 - 08:14 AM


Help
This topic is locked

MultiQuote















