TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Might be a pretty basic question...

Page: 1 Reply
Aug 13th 2002#64497 Report
Member since: May 15th 2002
Posts: 68
I know the HTML code for having a link open in a new window is , but is there a code for defining the size of the new window as well as a way to make it so the size can't be changed?

Thanks
Reply with Quote Reply
Aug 13th 2002#64508 Report
Member since: Mar 20th 2001
Posts: 3367
Put this inside your <head></head> tags

<script>
function OpenWindow( url, width, height, options, name )
{
if ( ! width ) width = 475;
if ( ! height ) height = 250;
if ( ! options ) options =
"scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes";
if ( ! name ) name = "outsideSiteWindow";
var newWin = window.open( url, name, "width=" + width + ",height=" +
height + "," + options );
}
</script>

For opening the window :

<a href="javascript:void(0);" onClick="OpenWindow('page.html',width,height,'scrollbars=no,menubar=no,toolbar=no,location=no,status=no,resizable=no'); return false">Link</a>

Replace page.html with the page you want to open and width and height with the size.
Reply with Quote Reply
Aug 13th 2002#64534 Report
Member since: May 15th 2002
Posts: 68
Thanks sidefx.

I put all that code in and the window appears when I click on the link but the page that is supposed to be in that window does not show up. I get the "The page cannot be displayed" page instead.

Any idea's?
Reply with Quote Reply
Aug 13th 2002#64536 Report
Member since: Apr 1st 2002
Posts: 1487
you probably didn't write the correct URL. double check the code for the URL of the page you're trying to open.
Reply with Quote Reply
Aug 13th 2002#64549 Report
Member since: May 15th 2002
Posts: 68
I got it working...for some reason is woldn't show the page until I saved the page I was working on and closed it.

Thanks for the help.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum