Fixed Window Size

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

Moderator: Don_HH2K

Fixed Window Size

Postby MrJohn » Wed 12 Oct, 2005 7:52 am

Hello. I'm quite a bit of a novice, but I hope someone can help. I've started to set up a website, which can be found at http://www.thebombclubnight.co.uk.

Can anyone help me with a script that will open and fix the window to a specific size so the user can't resize it? At the minute, when the page opens you can see the main content surround by an empty white area - and I don't want any white to be displayed.

Thanks

John
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; University of Leicester; .NET CLR 1.1.4322)
MrJohn
new member
new member
 
Posts: 2
Joined: Wed 12 Oct, 2005 7:45 am

Re: Fixed Window Size

Postby Antony » Wed 12 Oct, 2005 8:39 am

Hello John,
Welcome to SillyDog701.

MrJohn wrote:Can anyone help me with a script that will open and fix the window to a specific size so the user can't resize it?
To open a new window with fixed size, you will need to use JavaScript for this.
Syntax:
[tt]open("URL", "windowName", "width=XXX,height=XXX,resizable=no")[/tt]

Say you want to open this page, index2.html, to be 400 wide and 300 height and non-resizable, simple add a link similar to following to your main page:
Code: Select all
<a href="#" onclick="window.open('index2.html', 'mywindow', 'width=400,height=300,resizable=no');">click here</a>


Hope this helps.
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.7 (KHTML, like Gecko) Safari/412.5
User avatar
Antony
diamond member
diamond member
 
Posts: 14509
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

Postby MrJohn » Wed 12 Oct, 2005 8:53 am

Thanks Anthony,

is there any way to do the same thing to the original index page?
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; University of Leicester; .NET CLR 1.1.4322)
MrJohn
new member
new member
 
Posts: 2
Joined: Wed 12 Oct, 2005 7:45 am

Postby Antony » Wed 12 Oct, 2005 9:04 am

MrJohn wrote:is there any way to do the same thing to the original index page?
You can resize the window (use JavaScript), but it's very annoying in my opinion.
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.7 (KHTML, like Gecko) Safari/412.5
User avatar
Antony
diamond member
diamond member
 
Posts: 14509
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

Hi Anthony

Postby Blackbeard » Wed 12 Oct, 2005 11:48 pm

Feel free to take a look at my testing site and if there's anything I can help you out with please feel free to come back to me on it.

There's lots of great stuff on the web viv-a-vis JavaScript Tutorials and in my view is a lot more reliab;e for some things like slideshows than Flash. Granted a little fiddlier to account for slide transition given donload times.....


Cheers


- Blackbeard

http://www.murphswebs.com
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 (ax)
User of: :ff: Firefox 1.0 :ns7: Netscape7.2 Opera 7.53, :ie: IE 6.0 :win: Win XP Pro SP2
User avatar
Blackbeard
senior member
senior member
 
Posts: 91
Joined: Tue 05 Oct, 2004 12:17 pm
Location: Caracas, Venezuela


Return to Web Design and Page Coding

Who is online

Registered users: Google [Bot]