[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Create a web pages that's around 800x800

How do I create a web page that when opened in a new window is around 800x800, and cannot be made full-screen-size ?

It's supposed to be a small window that has a slideshow of pictures.
0
Alaska Cowboy
Asked:
Alaska Cowboy
  • 6
  • 2
  • 2
2 Solutions
 
Gurvinder Pal SinghCommented:
you can do
window.resizeTo(800, 800);
to set the screen size

and
this.window.noResize = true;
disable the maximize button.


0
 
Alaska CowboyAuthor Commented:
thanks, where do I put that ?
- kind of need the exaxt html, fairly new at this but not a novice, basically an advanced beginner.
0
 
Gurvinder Pal SinghCommented:
call it in the method resizeWindow() which will be called at onload event of body

function resizeWindow()
{
}

<body onload='resizeWindow()'>

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Alaska CowboyAuthor Commented:
thanks, will try tonight after work
0
 
s8webCommented:
Are you opening this new window from a link on an existing page?
0
 
Alaska CowboyAuthor Commented:
yes, opening from another link.
0
 
s8webCommented:
You could do it with js like this (snippet)

The restricted resizing  will not work in FF. You might not want to go with 800px height though as it is bigger than many folks browser windows.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Window JS</title>
<script type="text/javascript">
function newWindow(winName,w,h) {
	newWin = window.open(winName,"newWin","scrollbars=no,resizable=no,toolbar=no,locationbar=no,width="+w+",height="+h+",left=50,top=100");
}
</script>
</head>
<body>
<a href="javascript:newWindow('http://www.yourlinkhere.com',800,800)">link</a>
</body>
</html>

Open in new window

0
 
Alaska CowboyAuthor Commented:
ok, thanks a lot. will try out later tonight.
0
 
Alaska CowboyAuthor Commented:
it worked once in FF then it would open with most recent tabs in full screen.
With IE, Chrome, Safari, and Opera it all opened in a new "tab" of an already full screen.
But you showed me what to do, thanks.
0
 
Alaska CowboyAuthor Commented:
Worked !
It opens up in all browsers as 500,500 for a slideshow.
But I can't get my slideshow working, that's another issue
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 6
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now