Forum index / Computers / open new window

open new window

26 posts · page 1 of 1

post #2
08 August 2005, 14:27 UTC#2
Tell me what you use to make your sites and I might just tell you.
post #3
08 August 2005, 14:34 UTC#3
front page blink.gif
post #4
08 August 2005, 14:39 UTC#4
Well your asking the right person...

Ok..
Click Hyperlink, And then the "Edit Hyperlink" thing will show up..
And then Type in your Address that you want and then Click Target Frame..
And then Click New Window, And then.... Click Ok.
post #5
08 August 2005, 14:44 UTC#5
cheers man
biggrin.gif
post #6
08 August 2005, 14:53 UTC#6
Welcome to the home of web illiteracy and non compliant HTML. Welcome to Microsoft Frontpage.
post #7
08 August 2005, 15:07 UTC#7
mikey that way you said dosnt seem to work it opens it in a new browser with scroll bars and that does any one elce know?
post #9
08 August 2005, 16:27 UTC#9
Mikey: Oh Right, ill have a try at making it my self and tell you.
post #10
08 August 2005, 16:29 UTC#10
soz mik wud help you but a dont have a clue about makign websites, but I can make a nice bbq if ya want :)
post #11
08 August 2005, 16:48 UTC#11
Ok..

What I said was right, so Right Click on the page that you want to be the right size..

Then Click Page Properies and then Margins..

The Set it out how Big Or Small You Want it.

EDIT: Im Not Sure If It Will Work, But it worked For Me.
post #12
08 August 2005, 17:00 UTC#12
edit: ignore my comment
post #13
08 August 2005, 17:56 UTC#13
QUOTE(nutters @ Aug 8 2005, 04:10 PM)
I wanted to make this pop up in its own seperat window
[right][snapback]141610[/snapback][/right]


To do what you want you really need some javascript. If you haven't done any coding before then you'll have some fun with this!

First you need a function to open a new window that's called when you click on the link. Next you'll need another function that runs when the new window loads that resizes and centres it.

You'll need to do this in code view...

Put this in the document with the link in. It must go just before the </head> tag:

CODE
<script language="javascript" type="text/javascript">
function openNewWin(gotoURL)
{
window.open(gotoURL,"", "left=200,top=200,width=10,height=10,resizable=yes,scrollbars=yes,status=yes");
self.focus();
}
</script>


Set up the link you want to open the new window like this and replace page.htm with the page you want to open.

CODE
<a href="javascript:openNewWin('page.htm')">Your Link Text  or Image Here</a>



Finally, in the code for the page that is to be opened in the new window, put this code into the bit above the </head> tag:
CODE
<script language="javascript" type="text/javascript">
var width  = parseInt(550);
var height = parseInt(375);
var trueWidth  = width + 12;
var trueHeight = height + 29;
var left = (parseInt(screen.width)  - trueWidth)  / 2;
var top  = (parseInt(screen.height) - trueHeight) / 2;
window.moveTo(left, top);
window.resizeTo(width + 12, height + 29);
window.focus();
</script>


If all goes well, clicking on the link should make the window open on the top left of the screen. It will then move itself to the centre and resize itself to the dimensions chosen (the 550 and the 375 values - you can choose your own).

There is more info Here

I don't use Frontpage so perhaps someone who does can talk you through it in greater detail but this code should do exactly what you want.

post #14
08 August 2005, 17:58 UTC#14
Theres easier ways..but I wont desribe
post #15
08 August 2005, 18:05 UTC#15
If he just wants it to open in a new window, without javascript all he has to do is put in target="blank" or target="_blank" I can't remember which.
post #16
08 August 2005, 18:47 UTC#16
QUOTE(Wilbur @ Aug 8 2005, 07:05 PM)
If he just wants it to open in a new window, without javascript all he has to do is put in target="blank" or target="_blank" I can't remember which.
[right][snapback]141698[/snapback][/right]


If he just wants to open it in a new window with toolbars, address bar etc, then that is fine. He'll need target="_blank" to open in a new window.

However, that's not what the example that he gave does. If you have a look at the images on his previous post, you'll see that there is no address bar or toolbars in the opened window. Afaik the only way to do that is by using a javascript function of some sort to open a new window without these present.

You can always cram it all into something like this:

CODE
<a href="#" onClick = "window.open('page.htm', '', 'height=400,width=770,status=yes,scrollbars=no,resizable=no')">The Link</a>


It's simpler but you don't get the auto-centering feature.
post #17
08 August 2005, 21:18 UTC#17
I cant get any of the java script to work is there any chance of any one doing it for me? blink.gif
post #18
10 August 2005, 10:10 UTC#18
QUOTE(nutters @ Aug 8 2005, 10:18 PM)
I cant get any of the java script to work is there any chance of any one doing it for me? blink.gif
[right][snapback]141945[/snapback][/right]


Try this as a start. Create a new text document with notepad and paste this into it:
CODE
<html>
<head>
<title>Main Page</title>
</head>
<body>
<a href="#" onClick = "window.open('popup.htm', '', 'height=400,width=770,status=yes,scrollbars=no,resizable=no')">Open Popup</a>
</body>
</html>


Save it as main.htm.

Next, create another new text document with notepad and paste this into it:
CODE
<html>
<head>
<title>Popup Page</title>
</head>
<body>
<p>Popup Page Content Here</p>
</body>
</html>


Save this one as popup.htm in the same place as the first one. Double click main.htm. You should see a link and if you click on the link the new popup will open.

Once you've got that working you could have a go at putting the other code in to get the full effect. Doing it yourself is the best way to learn.
post #19
10 August 2005, 10:19 UTC#19
cheers man starting to work now biggrin.gif
post #20
10 August 2005, 10:35 UTC#20
QUOTE(nutters @ Aug 10 2005, 11:19 AM)
cheers man starting to work now  biggrin.gif
[right][snapback]143413[/snapback][/right]


Cool. Try replacing all the code in popup.htm with this:
CODE
<html>
<head>
<title>Popup Page</title>
<script language="javascript" type="text/javascript">
var width  = parseInt(550);
var height = parseInt(375);
var trueWidth  = width + 12;
var trueHeight = height + 29;
var left = (parseInt(screen.width)  - trueWidth)  / 2;
var top  = (parseInt(screen.height) - trueHeight) / 2;
window.moveTo(left, top);
window.resizeTo(width + 12, height + 29);
window.focus();
</script>
</head>
<body>
<p>Popup Page Content Here</p>
</body>
</html>


That takes care of the centering.

All you need to do then is to edit main.htm and change:
CODE
height=400, width=770

to
CODE
height=10, width=10


It's pretty much there then.
post #21
10 August 2005, 17:44 UTC#21
iv had a go and it seems to be woeking on my com just the pop up isnt big enuff do you recon you could edit the html and post the edited version?
post #22
10 August 2005, 19:00 UTC#22
QUOTE(nutters @ Aug 10 2005, 06:44 PM)
iv had a go and it seems to be woeking on my com just the pop up isnt big enuff do you recon you could edit the html and post the edited version?
[right][snapback]143649[/snapback][/right]


just decide what size you want the popup and then change the two lines in popup.htm:

var width = parseInt(550);
var height = parseInt(375);

Replace 550 with the width you want and 375 with the height you want (in pixels) and that will do it.
post #23
10 August 2005, 19:35 UTC#23
thanks man biggrin.gif
post #24
12 August 2005, 08:22 UTC#24
Does anyone know how to get the new window to open when using Macromeida Dreamweaver?
post #25
12 August 2005, 17:33 UTC#25
QUOTE(lifeofboredom @ Aug 12 2005, 09:22 AM)
Does anyone know how to get the new window to open when using Macromeida Dreamweaver?
[right][snapback]145909[/snapback][/right]


Use code view and add the code given here into your pages manually.
post #26
12 August 2005, 18:21 UTC#26
Cheers brotherin