Forum Moderators: open

Message Too Old, No Replies

Setting predefined sizes for pages in Dreamwever.

         

politik

7:29 pm on Feb 26, 2004 (gmt 0)

10+ Year Member



Hi, im having trouble with the height and width of pages in Dreamweaver. The page im trying to size contatins 6 frames. Ive set the sizes of each individual frame, but when i preview the page in internet explorer the window appears at its default size (the size a window appears when opening a new page).

Does anybody have any idea how i can stop this from happening?

thanks, joe.

thehittmann

6:22 am on Feb 27, 2004 (gmt 0)

10+ Year Member



You cannot specify the size of the browser windows normally. You can do it though if the link is opened using javascript in a pop up window. This following code may be useful to you.

<a href="javascript:window.open('[YourURL]','[YourWindowName]','[WindowOption1],[WindowOption2],etc...');"

Common window options are:
width=(in pixels, e.g. 350)
height=(in pixels)
toolbar=(yes/no)
directories=(yes/no)
location=(yes/no)
menubar=(yes/no)
resizeable=(yes/no)
scrollbars=(yes/no)
status=(yes/no)

<a href="" OnClick="window.close()">Close Window</a>

The height and width can be set to whatever you like and you can make them non-resizable if you wish. Play around with the code to suit what you want. This will not work though for your main window....As far as I know that cannot be changed.

politik

2:45 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



thanks very much. this is exactly the sort of thing i was looking for. am i right in thinking this code is used in the hompage window, where the frameset window will be linked from?

thanks, joe.

politik

3:33 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



hi there, im still having trouble using this code.

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<a href="javascript:window.open('[file:///Macintosh%20HD/Desktop%20Folder/testing/frameset_kitch.html]','[website]','[width=(829)]','[height=(573)]','[toolbar=(no)]');"
</body>
</html>

thats how the page looks at the moment, but the javascript code still isn't working. It's telling me that its 'missing a closing bracket or a quote'. Being a complete beginner at using javascrpit coding, im not sure what to do to make this page work.

please help. thanks, joe.

thehittmann

12:58 pm on Feb 28, 2004 (gmt 0)

10+ Year Member



just remove the ( and )'s and it should all work fine now