Hi all,
I'm very much an amateur designing a page (for free!) for a friend, so
any help offered would be hugely appreciated.
I'm aiming to open a maximised window (and isn't that fun...) and
found the following script on a freescripts page to do just that... it
works perfectly.
Into head section:
<script language="javas cript">
<!-- Hide from older browsers
function openme(){
w = screen.width;
h = screen.height;
ah = h - 25
nw=window.open( "your_page.htm" ,"",'toolbar=ye s,location=yes, directories=yes ,menubar
=yes,scrollbars =yes,status=yes ,resizable=1,wi dth='+w+',heigh t='+ah)
window.nw.moveT o(0,0)
}
-->
</script>
And the event to open the window:
<script language="javas cript">
<!-- Hide from older browsers
if (document.all){
document.write( '<a href="#" onclick="openme ()">click here to open a
full window</a>')
}
else{
document.write( '<a href="your_page .htm">click here to open a full
window</a>')
}
-->
</script>
Now, what I would really like to do is to alter this so that I can
pass the openme function the webpage that I would like to open in a
maximised window. Preferably, this should work with both internal and
external webpages. I've tried to tweak this with my minimal knowledge
of JavaScript but with no success.
Thanks in advance,
Dave.
I'm very much an amateur designing a page (for free!) for a friend, so
any help offered would be hugely appreciated.
I'm aiming to open a maximised window (and isn't that fun...) and
found the following script on a freescripts page to do just that... it
works perfectly.
Into head section:
<script language="javas cript">
<!-- Hide from older browsers
function openme(){
w = screen.width;
h = screen.height;
ah = h - 25
nw=window.open( "your_page.htm" ,"",'toolbar=ye s,location=yes, directories=yes ,menubar
=yes,scrollbars =yes,status=yes ,resizable=1,wi dth='+w+',heigh t='+ah)
window.nw.moveT o(0,0)
}
-->
</script>
And the event to open the window:
<script language="javas cript">
<!-- Hide from older browsers
if (document.all){
document.write( '<a href="#" onclick="openme ()">click here to open a
full window</a>')
}
else{
document.write( '<a href="your_page .htm">click here to open a full
window</a>')
}
-->
</script>
Now, what I would really like to do is to alter this so that I can
pass the openme function the webpage that I would like to open in a
maximised window. Preferably, this should work with both internal and
external webpages. I've tried to tweak this with my minimal knowledge
of JavaScript but with no success.
Thanks in advance,
Dave.
Comment